Hello,
I have found thanks to this thread : https://community.atlassian.com/t5/Jira-questions/How-to-execute-all-the-validators-defined-in-the-Workflow/qaq-p/892011
that I can use the "getValidators()" method to the the validators associated to a transition. However, it returns me the validator object (I assume), and I want the name and the description of what it does.
Example:
allStatuses.each { status ->
def relatedActions = eachWorkflowObject.getLinkedStep(status).getActions()
log.warn("For the status " + status.name + " the available transitions are: " + relatedActions)
relatedActions.each { it ->
def validators = it.getValidators()
log.warn("For the transition " + it + " the validators are: " + validators)
}For the transition Close Issue (resolveissue) the validators are: [com.opensymphony.workflow.loader.ValidatorDescriptor@3e54be25]
That;s great, but I would love to get information like:
For the transition Close Issue (resolveissue) the validators are: resolution field is mandatory.
I tried with it.getValidators()*.name , or validators.name and it is blank.
What are the properties accepted by a validator, or the functions that can be used to get a readable description of the validator?
Thank you!