Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Advanced compare condition - check if a value is selected in checkbox and skip the same value

Priska Aprilia May 17, 2022

I have a use case where I need to iterate over a list of values from an Extension for Jira Service Management bundled field and then check the following conditions for each iteration:

  1. check whether the value is selected in a checkbox of an issue noting that not all values exist in the checkbox.
  2. check if the current value is the same as the previous value, if they are the same then skip and move to the next one.


The content of the bundled field is in an array like below where the actual values I want to extract are all in the even indexes. The values in the even indexes are also options in the checkbox but only all of them will be selected in the checkbox.

 

"subfield_10015": [

            "option_10000",
            "Solution A",
            "option_10000",
            "Solution A",
            "option_10001",
            "Solution B",
            "option_10002",
            "Solution B",
            "option_10002",
            "Solution C",
            "option_10003",
            "Solution D"

        ]

I have tried the followings:

  1. Using contains regular expression or contains.
    This option only works if the first value has more than value. In case, where the first value has a single value, this will not work.
    image.png
  2. Using JQL condition

    image.png
    While this option works for both single and multiple selected checkbox values. However, sometimes I got the following error.
    image.png

Also, I have the following conditions
image.png

The initial value of the variable prevSolution is EMPTY and I have an action to set the value after a send web request action. image.png

 

However, it looks like the prevSolution variable has never been set because the following condition is always evaluated to true.

image.png

Does anyone have any idea how can I achieve the use case explained above?

1 answer

0 votes
Eric
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 24, 2022

Hi @Priska Aprilia 

 

Thanks for reaching out! So we can get a little more info about this problem, it’s best if you raise this through the support portal at https://getsupport.atlassian.com/ so the team can take a closer look about the intermittent error you're seeing.  While we're at it, we'll also be more than happy to help figure out the issue with prevSolution not being set.

 

Cheers,

 

Eric 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events