Hello community,
I have a select list with multiselect value and I need to know from automation rule which values have been deselected by the user after the update.
Because for each deselected values, I want to send a update from api to status page to reset component status
ex:
Before update customfield "StatusPage" 4 values were selected component1, component2, component3 and component4
After customfield value update selected values by user are component1 and component2
So at this moment, Automation compares previous values to new values selected and detect component3 and component4 deselected then automation send a webrequest api to statuspage to reset component statuses of component 3 and 4.
For the webrequest, I know how to update.
For the moment my issue is to compare old selected values to new selected values and to get which values have been deselected
a loop from all available values from the field to compare old selected values to new selected values
For the moment, I create this rule without loop.
And I think I will have to add additional conditional fro each comparison to be sure that the loop does not stay at the first step of condition and pass all conditions
ex
1st loop
Compare if fieldchange.fromstring contains value1 and fieldchange.fromstring does not contains value1 and comparison = no
2nd loop
Compare if fieldchange.fromstring contains value1 and fieldchange.fromstring does not contains value1 and comparison = yes
Compare if fieldchange.fromstring contains value2 and fieldchange.fromstring does not contains value2 and comparison = no
loop3
Compare if fieldchange.fromstring contains value1 and fieldchange.fromstring does not contains value1 and comparison = yes
Compare if fieldchange.fromstring contains value2 and fieldchange.fromstring does not contains value2 and comparison = yes
Compare if fieldchange.fromstring contains value3 and fieldchange.fromstring does not contains value3 and comparison = no
Have you instead tried using the field change, deleted values, smart values to do this: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--fieldChange--
And, if possible, I recommend making a single call to your REST API endpoint rather than looping to call for each one.
Kind regards,
Bill
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.