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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.