How do I specify multiple issue types in a LiveFields hook?

Following up on my previous question where I was given the following example:

if(argv["screen"] == "create-subtask" && argv["issueType"] == "Sub-task")

How would I apply it to multiple issue types?  Can I use "contains" or an array variable in place of the ==?

Thanks!

1 answer

1 accepted

0 votes
Accepted answer

Hi Brian,

Yes, you can use contains routine.

A simple example would look like this:

 

string[] issueTypes = {"Bug", "Task"};
if (contains(issueTypes, argv["issueType"])) {
lfGlobalMessage("yes", "INFO");
} else {
lfGlobalMessage("no", "INFO");
}

 

Hope this helps,

Alexandra

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Feedback & Announcements

How do you analyze GC logs, thread dumps and head dumps?

Hi awesome community!  In this article, I would like to describe the one of the toolset (service) for the analyze some problems on different Java-based instances, of course, as Atlassian admini...

91 views 0 7
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you