The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Groovier way to write a line of code

Joel Batac
Contributor
June 9, 2022

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Daniel Kappers
June 9, 2022

You can try the code below.


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