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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


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
Community Members
Community Events
Community Groups

Need to copy the assignee field to developer field in a transition screen.


i wanted set the Developer field values as same in assignee field in a transition screen.

I've tried with Groovy script ( set field value ) on post function.

Below is the code snip:



it complies without any error but the screen doesn't showing the expected result.

Any suggestions on this ? 

1 answer

1 accepted

0 votes
Answer accepted

You don't appear to be using a set in your code.  When you do, is a good bookmark for sample code.

Thanks for the Reply @Nic Brough -Adaptavist- , i've one more query i.e whether the first code in the above link will work for copying value from system field to system field ?

below is my current configuration:


Broadly, yes, I think you can see how to use other fields in there.

I've tried with setCustomFieldValue seems something missing. i have added my code below. can you have a look on it ?developer.JPG 

its returning Null, but the assignee field is not empty for the case I've tested with.

The result is what the script returns.  You have no return value at the end, so it's coming out with null.

I think you need to return either the assignee or the current value of the field (so it doesn't replace it with null)

@Nic Brough -Adaptavist- Thank you :) That really worked well. 

below is the final code :

import com.atlassian.jira.*
import com.atlassian.jira.user.*
import com.atlassian.jira.component.ComponentAccessor

def userUtil = ComponentAccessor.getUserUtil()
if ( == "Bug")
issue.setAssignee(userUtil.getUserByName("User Name"))
return (issue.get("fieldA").getName())

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events