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
4,298,226
Community Members
 
Community Events
165
Community Groups

Groovier way to write a line of code

Is there a groovier way of writing thiscode?

if(Id.getIssueType().getName() == "Initiative" &&  issue_status != "Closed" && issue_status != "Resolved" && issue_status != "On Hold" && issue_status != "Blocked" && checkNumberofIssueLink > 0) {

I tried writing it like the below but it's not getting the desired result (e.i, it's pulling issue that are either Block or Resolved or Closed.

if(d.getIssueType().getName() == "Initiative" && issue_status !=(['Closed' && 'Resolved' && 'On Hold' && 'Blocked']) && checkNumberofIssueLink > 0) {

1 answer

You can try the code below.


if(d.getIssueType().getName() == "Initiative" && issue_status NOT IN ('Closed', 'Resolved', 'On Hold', 'Blocked') && checkNumberofIssueLink > 0) {


Suggest an answer

Log in or Sign up to answer
TAGS

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