Move Status used field Checkboxes in Post Fungtion - Transition current issue (JMWE app)

Tyas Iglecias April 5, 2020

I want to set Transition current issue (JMWE app) 

 

I Have field Checkboxes name : Recomendation SF

 

it has Options :

- Infra

- DM

- Apps

 

And Other Field : 3 Select List (single choice)

- Infra Approved

- DM Approved

- Apps Approved

 

How to set condition :

- If Checkboxes choice Infra 

and  Infra Approve  value = yes 

its true

 

- If Checkboxes choice Infra and DM

and  Infra Approve  value = yes 

and DM Approve value = yes

its true

------------------------------------------------------------------------------------------ 

if Actual Logic like below, transition not move

- If Checkboxes choice Infra and DM

and  Infra Approve  value = yes 

 

 

Please help me how to used this reference

Capture.JPG

2 answers

0 votes
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 6, 2020

I believe this is what you are looking for:

{{ (issue.fields.customfield_10401 | find({"value":"Infra"}) == null or issue.fields["Infra Approved"].value == "Yes")
and (issue.fields.customfield_10401 | find({"value":"Apps"}) == null or issue.fields["Apps Approved"].value == "Yes")
and (issue.fields.customfield_10401 | find({"value":"DM"}) == null or issue.fields["DM Approved"].value == "Yes")
}}
Tyas Iglecias April 15, 2020

Thanks David its work,


please teach me, logic you build to solving my problem and implement to the script

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 15, 2020

The expression is made of three sub-expressions combined with an "and" logical operator. Each expression is enclosed in parentheses.

If we focus on the first:

(issue.fields.customfield_10401 | find({"value":"Infra"}) == null or issue.fields["Infra Approved"].value == "Yes")

 What this expression means is:

  • either customfield_10401 does not contain value "Infra" ("Infra" is not checked), or (if "infra" is checked),
  • the "Infra Approved" field's value is Yes

which basically means that if Infra is checked, Infra Approved must be "Yes".

The same logic then applies to the other two sub-expressions for Apps and DM.

Tyas Iglecias April 23, 2020

thanks for your information, David

0 votes
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 5, 2020

Can you elaborate on the actual logic, because there are many possible cases that you did not cover in your examples? 

Also, what do you mean by "And Other Field : 3 Select List (single choice)"? Do you mean you have three single-select type fields with values "Yes" and "No" or something like that? What are exactly the values (case-sensitive)?

Are you trying to trigger the transition when each checkbox that is checked has its corresponding Infra/DM/Apps Approved single-select field with "Yes" as its value? 

Tyas Iglecias April 5, 2020

This the Field:

1. Checkboxes name : Recomendation SF

it has Options :

- Infra

- Apps

2.  Infra Approved

it has Options :

Yes/No

3. Apps Approved

it has Options :

Yes/No

 

The workflow design is close to a parallel approval if choice multi option.

I need Create Condition In Transition Automate : A to  Transition Automate : B

Checkboxes = Infra

Infra Approved = Yes

= true

OR

Checkboxes = Apps

Apps Approved = Yes

= true

OR

Checkboxes = Apps & Infra

Apps Approved = Yes

Infra Approved = Yes

= True

 

left: if choice 1 option (blue line)

Right: if choice 2 option (blue line 1st process and yellow 2nd process)

Capture.JPG

 

How to Use this?

b.JPGa.JPG

Tyas Iglecias April 6, 2020

if the quetion : 

Are you trying to trigger the transition when each checkbox that is checked has its corresponding Infra/DM/Apps Approved single-select field with "Yes" as its value? 

 

Yes, it is. but not only single-select but multi-select,
cause I can solve the single-select,

 

the problem is if I multi-select but, transition move before the logic not according what i want

Suggest an answer

Log in or Sign up to answer