Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

When field value is changed, search recent issues that contain the same value

oliver.peacey
Contributor
November 16, 2022

Hi,

Wondered if there were any ideas... I want to create an automation that will trigger upon an update to a specific field. When this is triggered, perform a search for issues that contain the same field value, and then return these results

I am working with a multi-select drop down field, so will need to be able to search for each value that has been selected within the field

E.g.,

  1. 'Field X' in Issue1 is empty
  2. 'Field X' in Issue1 is updated to contain "Test"
  3. On update, perform a search on all issues containing "Test" in 'Field X'. Return results

Thanks

1 answer

1 accepted

1 vote
Answer accepted
Bill Sheboy
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 16, 2022

Hi @oliver.peacey 

Short answer: this is not currently possible with automation rules...but you can get close.

Longer answer:

I recall there are recent, open defects that the changelog access within automation rules is not working for fields using lists, such as for labels, fixVersion, etc.  So you may not be able to exactly determine what changed with {{fromString}} and {{toString}}

What you can do is detect there was a change, and then still iterate over the current label values of the trigger issue using an advanced branch and lookup issues (with JQL) to search them, one by one, to take your actions (e.g. send an email for each label's matchinng issues).  Lookup Issues has a limit of 100 issues, and so if you expect more this may not be a good approach for you.

Kind regards,
Bill

oliver.peacey
Contributor
November 16, 2022

Hi Bill, thanks for the reply. After lots and lots of trial and error I was able to achieve this using Advanced Branching. 

As my field is a multi-select, it can be iterated over as a list within the branch; therefore I'm able to perform searches for each of the values selected within that field, like so:

 

Screenshot 2022-11-17 005148.png

 

Best,
Ollie

Like Bill Sheboy likes this
Bill Sheboy
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 17, 2022

Well done!  What would you expect to happen if another value is added, and target value is already in the selections?  For example from your question, "Test".

Suggest an answer

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

Atlassian Community Events