Hello,
I have two multiple select user fields, Testers and Reviewers.
I have an automation that triggers on values added in both these fields.
I create an Issue adding one User to each of these fields, during creation.
When the automation is triggered how can I access the values that were added in both these fields?
Using {{addedFieldChange}} only returns added values on one of the fields.
Hi @Gsfyris and welcome to the Community!
What is the underlying goal you are trying to achieve?
At creation, you are starting from 0 values in your fields, since the work item you are creating did not exist before. So it would be safe to assume that all the users that are listed in each field are new at that point and that - whatever you would like to do with the values in each list - were not there before.
When you want to automate things based on changes in the fields on existing work items - then it would make sense to create separate automation rules you can trigger by a value change of each separate field, to work around this problem.
Hope this helps!
Thank you very much for the suggestions!
The automation is large and complex and I want to avoid having and maintaining it in different places. This is why I want both fields checked and both Issue creation and edit included, i.e. to have a single automation.
Your suggestion about the empty "before" values is valid. Can I check whether the automation was triggered by creation or edit, so I can get the added values by a different approach in each case?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gsfyris -- Welcome to the Atlassian Community!
Yes, and...to the suggestions from @Walter Buggenhout
When a work item is created, the changelog available to rules likely provides no information...because as Walter notes, the values are all new.
A workaround to combine the logic with the Multiple Work Item Events trigger is to check the {{eventType}} smart value using a condition:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--eventType--
One more suggestion: with work item creation, a rule can start so quickly the data is not yet ready for use. I recommend always adding the Re-fetch Work Item Data action immediately after any create triggers. This will slow the rule slightly and reload the data before the steps proceed. (Atlassian knows about this defect and is actively working to fix it with architectural changes.)
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.