Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This means that you don't have to overwrite a script and test its operation on all projects that use a given workflow, and instead of that he can create a separate, additional test version that will only work on a project, user group or labels selected by him.


Creating a script:

Log in as a user with the Jira Administrators global permission.

...

In the left navigation bar in the Workflow section, select Groovy Templates Reusable Scripts


Script creation starts with Add Script, then choose its type and set a name.

...

After the editing is complete, decide the script should be:
a) activated now - click Save and Activate,
b) tested first - click Save

Connecting a script with a workflow:

The activated script should be connected to Workflow.
To do this, go to the Workflows tab, then edit the selected Workflow. At this point, select the Transition edition whose script operation should apply to and select conditions or validators or post functions.

After go to the list of possible to add functions, select from the list: Groovy Template Conditions / Validators / Post functions. 
Next from the list of created scripts, select the one to be added.


Create a test version of script: 

You have the option of creating next versions of scripts and testing them on only the projects, group of users or labels they choose.
To start testing the new version of the scripts you should:

...

  • click New version,
  • make changes to the script,
  • click Save as new version 
  • describe the new version (eg 1.1). 

Starting a test version: 

To perform the test:
- click Version button of the selected script to show all its created versions,
- with the version to be tested, click Test,
- go to Test Settings to set the dependencies of the tested transitions.

In the selected script only one version can be active and only one can be tested.
The active and tested version is always at the top of the list.



Test Settings: 

Thanks to this function, it is possible to set parameters (project, group of users and labels), for which scripts tests will run.

...

After adding all parameters click Save

Scripts Import / Export 

You can additionally import external scripts to the application and export all those out of the app. 

...