It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to set value of a custom field in jira using groovy script?

sandeep vb Jul 12, 2015

I need to copy value of a custom field into another customfield.
I tried this.

CustomField cf1 = cfManager.getCustomFieldObject(11419)
CustomField cf2 = cfManager.getCustomFieldObject(10204)
issue.setCustomFieldValue(cf2,issue.getCustomFieldValue(cf1))
 
But setCustomFieldValue function makes changes only in the issue object here but changes are not reflected in database. How can I achieve this?

 

1 answer

1 accepted

4 votes
Answer accepted
Andrey Kuzmin Jul 12, 2015

Hello, @sandeep vb.

Try solution that I suggested here.

sandeep vb Jul 12, 2015

Thank you very much Andrey Kuzmin, I tried what you had mentioned. I could make changes in the user database successfully.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Jira Software

Demo Den Ep. 5: Meet Jira Mobile

See how to use Jira on the go! Demo Den Episode 5 is here: meet Jira Mobile with  Jira  Product Manager Rayen Magpantay.  Demo Den is in our monthly series where a Jira PM demonstrates...

423 views 1 10
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you