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

Brian Leysath November 10, 2015

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
Answer accepted
Alexandra Topoloaga
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 10, 2015

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
TAGS
AUG Leaders

Atlassian Community Events