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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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 get values of a summary field

Team ,

I am trying to write a script for a field behavior in JIRA. As part of which I am trying to fetch the Summary ( system field ) value from a JIRA ticket. But as result the value in log shows a Null value for Summary.

I tried using below but know luck.

-- FormField ExtractType = getFieldById("summary")

-- FormField ExtractType = getFieldByName("summary")

Can someone help me to show how to get values of a summary field.

Thanks.

4 answers

It's:

getFieldById("summary"

or

getFieldByName("Summary")

Once you have the field, you call getFormValue() on it to get the actual summary. On which field have you attached this script?

Thanks Jamie ,

We are using a Text field for this script.

Summary is the name of the system summary field. Do you have a a custom field called Summary?

No we don't have any Summary custom field. We are using Summary system field only.

We even tried this with other system fields but getting the same error - Null value

Jamie ,

Can you please guide us on this issue ?

 

> On which field have you attached this script? Please answer my question.

Hi Moin, or Jamie - did anything ever come of this question? 

 

I believe I am having the same problem, my code is as so: 

import com.atlassian.jira.component.ComponentAccessor

def summary = getFieldById("summary")

summary.setHelpText ("Summary is: "+getFieldByName("Summary").getFormValue())

 I have tried a range of syntax:

getFieldByName("Summary").getFormValue()

getFieldById("summary").getFormValue()

getFieldByName("Summary").getValue()

getFieldById("summary").getValue()

Unfortunately in all cases my help text simply states the summary is Null, even when editing a ticket which has a summary set. 

 

Any help would be greatly appreciated

@Bob

Did you had any success in making above code work?

You can get summary like this;

underlyingIssue?.summary

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

How to log work and track time in Jira when a person is part of multiple teams

  The manager’s daily activities include a list of challenges to reach high levels of efficiency for their teams. Part of these challenges is related to how to deal with the worklog systems sin...

92 views 2 1
Read article

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