Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,466,932
Community Members
 
Community Events
176
Community Groups

Need help copying the value of one custom field to another using scriptrunner or automation for JIRA

Hello I am trying to copy the selected users from custom field user picker "New assignee" and "Default Assignee" from one issue to another. I already created issues with the correct assignees already selected. I would like the user to create an issue, select category they want (issue picker), and have their assignees prepopulated.  

I am using a custom field that is an issue picker on a create screen which allows you to select the desired issue without linking. The automation I have sets a custom field to value"{{issue.customfield_11102.key}}" which creates a hyperlink to the selected issue. (This is wanted)

I want to get the custom field user's form "My assignee" and "Default Assignee" (which were previously set) from the issue selected and assign it to the new issue being created.

So far from automation I have only been able to retrieve the key {{issue.customfield_11102.key}} and the summary {{issue.customfield_11102.fields.summary}} of the selected issue. I've tried using the custom fields of New Assignee - customfield_11087 and Default Assignee - customfield_11092 but with no luck. 

Is there a way to get the custom fields I want through automation or should I use scriptrunner? If I were to use scriptrunner are there any references I could use (have yet to find any)?

Please feel free to ask for more information if needed, I understand this may be complex, but this is greatly needed to help prepopulate the users instead of allowing my developers to have to do it every time they create a specific issue type.

1 answer

0 votes

Hi @Louis Andrews 

As you are noticing for your {{issue.customfield_11102}} information, not all of the other fields are present.  If they were, Jira would potentially need to load every single possible issue in a tree of issues when the rule executes.

Your alternative is to use a branch or Lookup Issues with JQL to get at that issue's complete fields.  Lookup Issues is probably going to be a better approach from what you have described.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events