Advanced compare condition

Peyush Agarwal May 17, 2021

I am trying to Automate one scenario where I need to use 

Advanced compare condition.

Now in this the field that I need to compare is Custom-Cascading field. 

 

It has like name as "Stage" with drop down as 

01-Contract 

                Approved

                Rejected

Now what I want is to compare if any user updates Stage field as Approved 

In JIRA search, this field value is displayed as 01-Contract - Approved 

What I am not able to understand is how to write it in Advanced compare condition 

{{issue.Stage.??

Stage.png

1 answer

1 accepted

1 vote
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 17, 2021

Hi Peyush,

Try {{issue.Stage}} = Approved

And if that doesn't work, give this a try:

{{issue.Stage.child.value}} = Approved

Peyush Agarwal May 17, 2021

Hi John,

 

Value of field Stage has 2 drop downs: 

01-Stage

02-QA

03-Build

with further if you eg select 01-Stage, it will show another set of values as: 

A

B

C

D

When you check for JIRA in search or export report, this whole field value will be displayed as:

01-Stage - A

01-Stage - B

etc.

 

Should I still use just as you suggested? 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 17, 2021

If Approved is not in the list for any other first level option, it might work. 

Otherwise, you can add two Advance Compare conditions - one to check the parent.value and then one to check the child.value.

Peyush Agarwal May 17, 2021

tried the way you mentioned 

with first value as {{issue.Stage.parent.value}}

and Second value as {{issue.Stage.parent.value}} = 04-QA

it doesnt work, am I doing anything wrong? 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 17, 2021

Can you share a screenshot of your latest rule and the audit log where it didn't work? 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 17, 2021

Actually, you shouldn't be using the advanced compare because they are not really two different fields - they are one field. 

Try changing the compare to just a JQL condition with {{issue.Stage}} = Approved

Peyush Agarwal May 17, 2021

hm so my Problem Statement is I want that if anybody changes this Stage field to 01-Contract in any JIRA instance, ENgineering JIRA should automatically get updated and so I need to put a checkpoint or condition to trigger this. and If I use this as a trigger point, I can go and take action on Linked issues of this JIRA

If I use JQL query, it will be difficult to use automation to trigger events on linked issues but I will try that way as well Stage_1.pngStage_2.png

Peyush Agarwal May 17, 2021

with the screenshots I have shared, condition passes in all cases 

Peyush Agarwal May 17, 2021

ok using your suggestion of using JQL and putting in multiple conditions, I have been able to find a workaround for this 

Like John Funk likes this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 17, 2021

Great! Glad it is working for you now!

ram esh August 30, 2023

Hi @John Funk . i have a kind of similar issue. please have a look at this post. https://community.atlassian.com/t5/Jira-Software-questions/link-2-different-Cascading-fields/qaq-p/2463721#M287014. i ve been struggling to get this done. i kind of have idea how get it working but not sure how to execute it. please check and advise me.

 

Thanks in advance

Suggest an answer

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

Atlassian Community Events