Updating Custom User Field from Project Role

Zachary Singh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 3, 2022

Hi There-

 

I am trying to update a User Select custom field at the time of the creation of a ticket from a project role. I have a custom field Project Manager and a Project Manager role. I want to copy the user from the Role into the custom field. 

I am either hoping to do it via post function (change %%CURRENT_USER%%) or via the Automation rules in Cloud. 


Thoughts? 

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 3, 2022

Hi @Zachary Singh 

Where is the information about your "Project Manager Role" stored: an issue field, Jira Group, entity property, etc.?

If it is any of those you could use an automation for Jira rule.  To access a Jira Group you would need to call the REST API from the rule to get the user's account ID.  For the others (issue field or entity property) you should be able to access the data with rule actions.

Kind regards,
Bill

Zachary Singh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 4, 2022

Hey @Bill Sheboy it is a User in a project Role. So would it be calling the project role by ID or by name?

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2022

In that case, I do not believe this is directly possible yet...according to this suggestion to add accessing project roles from within automation rules:

https://codebarrel.atlassian.net/browse/AUT-279

One work-around would be to call the REST API with a web request from the rule to get the role information with this method:

https://docs.atlassian.com/software/jira/docs/api/REST/1000.824.0/#api/2/project/{projectIdOrKey}/role-getProjectRole

Like Zachary Singh likes this

Suggest an answer

Log in or Sign up to answer