Restrict Post Function of Groovy Script to only one issue type

Simone Kaden April 27, 2022

Hi,

i want to implement a groovy scripted post function in a workflow with multiple issue types. For one IssueType i want to be checked if the filled date for one field is sooner or later than the filled date of another date picker field.

It is concerning the contractual entry date and the actual entry date. The check should output an error if the actual entry date is before the contractual entry date. This should only be checked for issues where the actual entry date field is filled. The same thing i want to implement for the exit date. 

Because of the fact, that the workflow is for multiple issue types, not only the one i need to be checked, the output is that the error occurs that the field has to be filled, even if the field is not in this particular issue type.

Can anybode help me?

1 answer

1 vote
Antoine Berry
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 27, 2022

Hi @Simone Kaden , 

Are you using a script ? You could test against the issue type : 

if (issue.getIssueType().getName() == "Name of the issue type"){
Your script
}

Suggest an answer

Log in or Sign up to answer