This section has use cases which help you in understand the usage of Validators provided by JMWE.
On this page:
Field has been modified validator
.
Sample use cases:
Validate the change in Resolution provided when closing an issue
- Add the
Field has been modified validator to the Close transition. - Select
Resolution from Field.
|
|
Field is required validator
This validator can be used to ensure that a field has a value during a transition.
Sample use cases:
Validate the Affects Version/s and Assignee fields for a non-empty value on creating a Bug.
- Add the
Field is required validator to the Create transition. - Select
Affects Version/s and Assignee from Fields.
|
|
Comment required validator
This validator can be used to force the users to enter a comment while transitioning to a destination status.
Sample use cases:
Validate that a comment is entered when rejecting a Bug fix.
Add the Comment required validator to the Resolve transition of the Bug workflow. |
|
Field has single value validator
This validator can be used to check that a multi-valued field does not have more than one value during a transition.
Sample use cases:
Validate the Fix Version/s for a single value on an issue when the issue is fixed.
- Add the
Field has single value validator to the Close transition. - Select
Fix Version/s from Field.
|
|
Previous status validator
This validator can be used to stop the user from transitioning to a status unless the issue has previously been in a specified status in the workflow.
Sample use cases:
Block the transition of an issue to Close status if it has not been Approved.
- Add the
Previous status validator to the Close transition. - Select
Approved from Previous Status
|
|
Parent status validator
This validator can be used to stop the user from transitioning to a status unless the issue's parent has been in a selected status in the workflow.
Sample use cases:
Block the trigger of "Start Progress" on subtasks until its parent is approved.
- Add the
Parent status validator to the Start Progress transition. - Select
Approved from Parent Status
|
|
Scripted (Groovy) validator
This validator can be used to perform a validation with a groovy expression. Based on the result of the expression, the user is either allowed or blocked to transition to the destination status.
Sample use cases:
Block the creation of a Bug if no Attachment is provided.
Validate the Cascade select for values in parent and child select dropdowns
Block the approving of the Change request if it has no confluence page linked
Block the approval of an issue if there is no PDF attached either from before or added during the transition
Linked Issues Status validator
This validator can be used to ensure that the current issue's linked issues are in one of the selected statuses.
Sample use cases:
Block the transition of the Epic to Closed status, if its stories aren't closed.
- Add the
Linked issues status validator to the Close transition. - Select the issue link type
is Epic of from the Issue Link Type field. Select the statuses the linked issues must be in, from Statuses Add the error message, "The Stories of the Epic are not yet resolved "
|
|
Linked Issue(s) validator
This validator can be used to ensure that a link to one (or more) issue(s) from the current issue is being created during the transition.
Sample use cases:
Block the creation of a Bug, if it is not linked to the corresponding functionality requirement.
- Add the
Linked issue validator to the Create transition. Select the issue link type relates to from the Issue Link Type field. Add the error message, "Associate/Link the Bug to the respective requirement ticket "
|
|