Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Restrict Post Function of Groovy Script to only one issue type


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 Apr 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

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you