Scriptrunner update description field

Olga Videc
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 11, 2019

Hello, 

I'm a dummy for grovy programing just starting but can someone help me 

I would like to update issue's description filed using Scriptrunner, i know that description is not a custome filed.

def desc = customFieldManager.getCustomFieldObjects(issue).find {it.name == 'description'}
issue.setCustomFieldValue(desc, 'my value')

 

2 answers

2 accepted

2 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 11, 2019
Olga Videc
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 11, 2019

Worked like a charm :D 

Thanks 

1 vote
Answer accepted
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 11, 2019

Hello @Olga Videc

Since description is not a custom field thus you don't need to use customFieldManager.

Here's the detailed documentation with code samples as to how you should update the Jira issue fields.

https://developer.atlassian.com/server/jira/platform/performing-issue-operations/

Olga Videc
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 11, 2019

Same as Nic send, thanks a lot. 

Suggest an answer

Log in or Sign up to answer