Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to automate copying an issue field value into a custom field?

John Ricard
Contributor
November 18, 2021

In JIRA Software Cloud, I am trying to copy the name of the issue creator into a custom field using automation.  I can access both fields and read the data but when the custom field is blank I want to put data into it.  I don't know how to put the data into the custom field.

Any thoughts?

 

2 answers

1 accepted

1 vote
Answer accepted
John Funk
Community Champion
November 19, 2021

Hi John - Welcome to the Atlassian Community!

Do you have a rule already created? Can you share that? 

Basically, you will create a new trigger for Issue Created

Then do a New Action for Edit Issue

Select the custom field and then click the 3 dots menu to the side of the field

Select Copy from

Then click on the words Current Issue

Select Reporter from the Field to copy value from 

John Ricard
Contributor
November 19, 2021

Hi John,

Thank you for the information.  Here is what I am trying to do.

I have a custom picker field called Change_Reporter.  What I am trying to do is, on issue creation, take the name of the issue creator and fill in the Change_Reporter field (like a default).  Then if the project manager wants to change the custom field he can choose some one else from the user picker list.

So far I have tried several actions and I am able to capture the issue creator's name using {{creator.displayName}} and at one point I was able to transfer that name to a variable but it eludes me how to populate the the custom field.

I tried your suggestion above using the Reporter field as a source but I was not able to get even the reporter name into the custom field. 

I used a manual trigger and a Log Action action with {{creator.displayName}} - {{issue.Change_Reporter.value}} - {{issue.Change_Reporter.displayName}} to see the result.

The audit log says that the rule was successful but a small orange triangle on the rule in the rule list says "last execution failed - see audit log".  When checking the custom field in the issue nothing has been populated.

That is where I am stuck.

John Funk
Community Champion
November 22, 2021

So with my suggestion, it did not copy the reporter to your custom field? 

But it said it was successful? 

Then it said the execution failed? 

Have you tried to update the custom field manually? 

John Ricard
Contributor
November 22, 2021

That is correct it did not copy the the reporter to the custom field.  Yes I had a green tag saying that the automation was successful.  But in the rule list there was the orange triangle and when I hover over it is says the message above.  I have no idea why I am getting two different messages.

The issue is still trying to get the reporter information to transfer to the custom field.

If by manually you mean can I select a user from the custom field's user picker list, yes I can.  The field appears to not accept the change via the automation. 

John Funk
Community Champion
November 22, 2021

That's very strange. Can you share the rule that you have? And the details where is it populating the custom field? 

Like Bill Sheboy likes this
John Ricard
Contributor
November 22, 2021

Hi John,

OK I got it working. I had missed a step from your list above.  I was not clicking on the words Current Issue.  Your process works well when I follow it in detail and I don't miss a step.  Thanks much.

Well now that I know that I can click on the highlighted words in the Edit Issue Fields action, I clicked on the Current Issue and changed it from Reporter to Creator which is what I wanted originally.  Now it all works as envisioned.

Many thanks, much appreciated.

Like John Funk likes this
John Funk
Community Champion
November 23, 2021

Great! Glad that is working for you. 

0 votes
Trudy Claspill
Community Champion
November 18, 2021

Hello @John Ricard 

Welcome to the community.

Have you explored the Automation for Jira feature?

https://support.atlassian.com/jira-software-cloud/docs/automate-your-jira-cloud-processes-and-workflows/

John Ricard
Contributor
November 19, 2021

Thank you Trudy.

I did have a look at this site but I did not find the answer there.  Some of the actions that are suggested in those pages are not available neither in the sandbox nor in our Cloud instance.

I will keep looking.

Trudy Claspill
Community Champion
November 19, 2021

Which actions specifically are not available?

I am not aware of there being a difference in the Automation functionality based on the level of your Jira Cloud subscription (free, standard, premium), so I would like to learn if you have found a difference.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events