Hello team,
I am trying to create a, automation to set the "organizations" field when not set.
When ticket is resolved, if orgnization is empty a, I want to get the first orgnaisation the submitter belongs to, and set the organization accordingly.
Here is the rule
{
"fields": {
"customfield_10002": [
{
"id": "{{issue.reporter.organizations.first.id}}"
}
]
}
}
I am getting th following error message :
Hello @Olivier Rocher
I don't believe that the smart value you are using is valid:
{{issue.reporter.organizations.first.id}}
When I try to log this smart value:
{{issue.reporter.organizations}}
...no values are logged.
Where did you find information that said this was a valid smart value? I don't see "organizations" listed as an attribute for user fields here:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-users/
If the Reporter belongs to only one organization there are settings that can be implemented in JSM to automatically set the Organizations field to that Organization when a Request is created. If the user belongs to more than one Organization then those settings cannot set the field automatically.
In that case, to the best of my knowledge you must use the REST API and a Send Web Request action to get the list of Organizations to which a user belongs.
Hi @Olivier Rocher ,
Have you checked if the organization field is present in Edit screen? Are you able to modify the organization manually in the UI when ticket is resolved?
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matteo,
thank you for the update.
I confirm the organization field is present and I can change the organization manually when ticket is resolved.
So, still do not know what the issue is.
Thank you,
Best regards,
Olivier
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.