Hello,
How to assign an issue to a user using Script runner for Cloud?
This used to work, but it stopped at some point:
def user = [name: "Johnt"]
issue.fields.assignee = user
Thanks
Hi @miller j ,
Instead of User name ,please enter user id on jira cloud,
procedure to get user id:
1.Click on user name
2.Go to tab
3.You will get an id
e.g .
issueInput.fields.assignee = [id:'123456:12345a67-bbb1-12c3-dd45-678ee99f99g0'] as Map
Just one question ,
Do you know how to copy custom field value while creating new issue in jira cloud using clone post function .
Hi @cgadade ,
I tried to follow your steps, but I do not see a user name anywhere.
When I go to Settings > User Management in Jira Cloud, I get the list of all users. When I click on a user I only see Full name, Email address and Nickname.
Is the Nickname unique and non-editable?
If not, how do you uniquely reference a user in a script?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Miller J,
I can confirm that it is no longer possible to set a user field using a users name since Atlassian recently updated their API's to make changes to comply with the GDPR legalisation as described here.
These changes means that all user references for API's have been updated to use an accountID rather than by using a name or key.
This legislation means that Atlassian has had to update all of its rest API's in order to comply with this which mandates how data is stored.
I can confirm that we have created a page in our documentation site located here which shows how you should update your scripts to be GDPR compliant and we would advise that you review this page in order to see further details of how to set a user using an accountID and can confirm that the section located here shows how to set a user field on an issue using a users account ID.
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is how I get a user by username, which you may find useful.
ApplicationUser user = ComponentAccessor.getUserManager().getUserByName("bsmith")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I use it for server; hopefully it will work for cloud, but I'm not sure. Give it a whirl and see.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.