Code wanted for default value for calculated field

I'm dumb and can't figure this out.

I have a custom calculated text fiedl. All I want is for it to display the value of another field.

How do I write the code in the 'Description' field to make that happen?

2 answers

1 accepted

I did make it work using the field index number, etc. But the field I wanted is the 'Sprint' field and the value I got was the index number of the sprint. Oh, well.

1 votes

How are you doing the "custom calculated text field"? With the script runner, a plugin or something else? As it's a calculated field, I'm not sure why you're looking at the default value as the default value won't matter if you override any entered data with a calculation.

Whatever you answer, the response is going to be roughly issue.getCustomFieldValue(field), but it will vary depending on how you want to do it.

Good catch. I didn't mean "Default" but "Description." I fixed that.

I'm talking about a custom "Calculated Text Field" which is described on the page where I select the new custome field type like this:

Calculated Text Field

A calculated tex field. The formula is stored in the field description, inside an html comment.

I'm trying to put in a screen shot:

Ok, before you do, a "calaculated text field" is not a standard function, it's being provided by a plugin somewhere, and don't know which one does it. I'm only really familiar with the hard-coded ones I've written, and the script runner, so I kind of need to know which plugin it is so I can skim the docs (I know roughly what needs doing in Jira terms, but not what the plugin needs from us)

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,011 views 12 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot