Forums

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

How to get Standard Field ID with groovy code?

Sngy September 24, 2020

Hello,

I know how to get the ID of a custom field. It is by this way :

def GIDField = customFieldManager.getCustomFieldObject(12905) 
def GID = issue.getCustomFieldValue(GIDField) as String

 

but how can I access a standard field ID like 'description'? I tried it like this:

def MailField = customFieldManager.getCustomFieldObject('description')
def Mail = issue.getCustomFieldValue(MailField) as String

 

But this obviously did not lead to results, since it is not a custom field.

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Tansu Akdeniz
Community Champion
September 24, 2020

Hi @Sngy ,

Please use the following;

//Examples
String description = issue.getDescription()
String summary = issue.getSummary()

Also check this doc: https://docs.atlassian.com/software/jira/docs/api/latest/com/atlassian/jira/issue/Issue.html

Regards 

Suggest an answer

Log in or Sign up to answer