I am writing an automation to look at the team field when an issue is created and set the affected service of the same name. In my testing the affected service is not being set but I am not receiving an error either. I am not great at json so I am wondering if my script needs adjusting and perhaps what might not be set correctly. Thank you!
Hi @Mikel Whipple
I see a few things to check in the rule images you show...
First, the Edit Issue (or Create Issue) action may only update a field one way in a single action: with the field dropdown list or with JSON. You have selected both. Please remove the field from the dropdown list, update your rule, and re-test.
Next, have you confirmed your value exactly matches one of the defined values for Affected Services?
Finally, if the smart value does not work, perhaps try the custom field ID for Affected Services in the JSON. You will need to look that up from an example work item, perhaps using this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Kind regards,Bill
Thanks. I am looking into this.
The article you posted was a ton of help, when I tested other variations of the JSON I still cannot find one to work. From the article it says to know the type of field you are wanting to change, although Jira does not list what type of field affected services is from my determination I am going with multi-select. Then from there I could either use update and set or field. Trying field I get a success but it does not set the affected service in testing, I have determined the Team and Affected Service are the same name. Then I used the update and set operation, knowing that I want to clear anything in that field and then set it. This gives me an error that affected service is not an array. I am still back to square one. Thanks for the help though, I might have to open a support case.
Would you please post the following images to provide context of your updates:
Thanks!
It looks like you're new here. Sign in or register to get started.