Forums

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

Copy value from Sytem Field to Custom Field

Ralf_Dondl March 11, 2020

I won't copy the value from the System Field Reporter in a Custom field. 

I try it with a Post Function in the Transition.  Set Field Value. 

And therewith the function  issue.get("reporter")username.chars.

 

And get the error messages  No user found with username 'issue.get("reporter")username.chars':

How can I solve that issue? What is the right function.

1 answer

0 votes
sukkeong
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.
March 11, 2020

I am guessing that you are using a plugin similar to 'Jira Miscellaneous Workflow Extensions (JMWE)' for the function you mentioned. 

Your function is almost correct. Here is what is should be.

 issue.get("reporter").username

 Additionally, you may need to test that the 'Reporter' field is not empty or null. If you have access to a groovy console (Jira > Administration > Add-ons > Groovy Console), you can test your scripts first.

Other functions

Alternatively, you can use functions to 'copy value from other field' post function, selecting source and destination fields. This may be easier to use.

Suggest an answer

Log in or Sign up to answer