Dear community,
I'm trying to change the reporter from a specific type of Tickets, but I'm having issues.
So the Ticket will be created with one generic JIRA account as reporter, and the goal is to setup the correct reporter based on the information we have in the Ticket description.
I've tried some command lines from the "Edit issue" , but I'm getting error message.
Ticket description:
Username: test01
Edit Issue script I tried:
{
"update":{
"reporter":{
"set";{{issue.description.match("(?i).*Username:\s*(.*)").asJsonObject("key")}}
}
}
}
Error message:
Hi @Hellen Braun -- Welcome to the Atlassian Community!
Due to the GDPR changes for privacy, you can no longer use just the name to set a user field. Instead you need the accountId value: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Single-user-picker-custom-field
Two possible work-arounds are to:
Kind regards,
Bill
Re: the REST API, it's a bit complicated, but do-able and documented here:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Hellen Braun -- we should probably ask are you running on Jira Cloud or Server/Data Center?
If you are on Cloud, then what @Bill Sheboy points out is correct, and you CANNOT use a username (example: darryllee) to set the Reporter. You would need to follow the example I linked to, which is almost exactly what you are asking for:
If you're on Server/DC, you don't need to mess with looking up the accountId. The on-prem versions of Jira still allow usernames.
But in both cases, you don't have to mess with JSON at all! Once you get the username or user accountId, can use Smart values when editing the Reporter field, like so if you were using Server/DC, you could do this:
(I use a Manual trigger for testing.)
The way you add a Smart value is to start typing in that field, and then when you're finished, click on the pop-up option that shows up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Deleted. Selected wrong place for answer.
Sorry.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Hellen Braun
Check please string with set. You wrote ; there, but must be :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Made the change, now the error message is different:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Reporter, which you wanted to assign, has enough rights, to be assigned?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, Board is open to every loged user.
I'm using the user username, I also tried by email, same error message.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please, check, that you can assign this user, try manually assign him.
Users can see board, but it's not a guarantee, that they can act as reporters.
And check please, that user, Actor, under whom rule is running, has enough rights to change reporter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The user, Actor, is Admin from this Board.
Also did the same process manually, it works.
I don't think is a lack of permission but something with the scripting, not sure about it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hellen, why are you talking about Board? Do you mean Project?
If not, then Project is not Board, and user can be administrator of Board, but he won't have rights to change reporters in issues of projects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's a project, but we use the Board to handle all issues.
The user Actor, is Admin from the Project. I was able to do changes manually with the same user.
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.