Page tree

Documentation for Structure version 5.3 and patch releases. Version Index

Skip to end of metadata
Go to start of metadata

Structure Workflow Validator

Structure Plugin adds a new workflow transition validator to JIRA. This validator blocks the transition if the issue doesn't match an S-JQL query. For example, it can be used to prevent an issue from being resolved if the issue has some unresolved sub-issues in a structure.

Adding an S-JQL condition for the issue creation transition will result in the S-JQL condition always evaluating to false. The validation check is done before the issue is inserted into the structure, so the S-JQL check won't find the issue.

To add the Structure validator to a workflow:

  1. Create a draft of the workflow and open the Add Validator to Transition dialog. (For more information, please refer to the Jira documentation.)
  2. Select the Issue Matches Structure Query validator. A configuration window will open:
     
  3. In the Structure field, specify how the validator should select the structure to check. It can either be a manually-selected structure, or it may depend on the issue being checked (the default structure of the issue's project or the structure that contains the issue).

    In Structure 3, the option to pick a structure that contains the issue being validated is no longer available.

  4. In the S-JQL Query field, enter the S-JQL query that the issue should match in order to pass the transition.

    You can use one of the examples provided with the form. Just select an example in the Query Examples selector, and the corresponding query will be copied into the S-JQL Query field.

  5. In the Validator Message field, enter an explanation message that users will see if their transitions are blocked by the validator.
  6. In the If the Issue Is Not Added to the Structure field, select whether the transition should be blocked or allowed if the issue is not contained in the checked structure. (Or if the issue does not belong to any structure, in case automatic structure selection is chosen.)
  7. In the Run as User field, select on behalf of which user the validator should run. It can either be a manually-selected user, or it may be the lead of the project of the issue that is being checked.

    Running on behalf of a user means that the validator will only see issues and structures that are accessible to the specified user. The result of the validator check will depend on the permissions of the specified user and will not depend on permissions of the user who performs the transition.

Structure Workflow Condition

Structure Plugin also comes with the Structure condition that is similar to the Structure validator. Using Structure condition may significantly increase the load on server, so this condition is not available by default.

To make Structure Workflow Condition available, enable the structure-workflow-condition module of the Structure plugin via Administration | Add-ons | Manage Add-ons page. For instructions, please see Universal Plugin Manager documentation.

Checking S-JQL condition may involve querying other issues in the checked structures, and in case the structure is large, this may take considerable time – yet within reason if it is done occasionally.

However, workflow conditions are checked every time a user opens an issue details page, in order to decide which transitions to show. If you have hundreds of active users and thousands of issues in a structure, this may easily degrade server performance.

Use your own best judgement.