Hi everyone,
I'm running into a puzzling issue with Jira Cloud automation. I want to set the assignee using a variable that contains the Atlassian account ID. If I hardcode the exact same account ID in my Advanced JSON—like this:
{ "fields": { "assignee": { "id": "5b10ac8d82e05b22cc7d4ef5" } } }
—it works perfectly, and the assignee is set without problems.
However, if I store that very same account ID in a variable (e.g., {{myUserId}}
), and then reference it like:
{ "fields": { "assignee": { "id": "{{myUserId}}" } } }
--the rule fails with the error “Specify a valid value for assignee (assignee)”.
I’ve checked the following:
asJsonString
, etc.Nothing seems to fix the error unless I manually hardcode the ID. Has anyone experienced this or know what might be causing the difference when using a variable versus a direct value?
Thanks in advance for any insights!
You can also use the Assign issue action in this automation, but perhaps you are using the advanced field edit, you can try something like you did with the asJsonString, the follow value:
{ "fields": { "assignee": { "id": "{{myUserId.trim}}" } } }
Best Regards.
Hi @Kawa Akbulut -- Welcome to the Atlassian Community!
For a question like this, context is important for the community to help. Please post the following:
Until we see those...
Have you confirmed your variable does not contain any leading / trailing spaces?
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.
Hi @Bill Sheboy & @Kawan Diogo,
Thanks so much for your help!
I finally got it working! Turns out the issue was that there was still a "Custodian"
prefix before the actual ID in the variable, which Jira didn’t recognize as a valid user ID. Once I cleaned that up and ensured only the raw account ID was stored, the assignment worked perfectly.
Appreciate both of your insights and suggestions—they really helped me troubleshoot the issue!
Kind regards,
Kawa
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.