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

How do I populate a custom field with the JIRA Sprint Field Values?

Harshal October 8, 2018

Every issue in JIRA has a default Sprint field. It is very straightforward. However, with bugs I need one more field - Found in Sprint. Values for this field are the same as that of default Spring field.

Sprint field represents the sprint in which issue is being addressed. However Found in Spring field is used to report in which spring this bug was found.

However, I am not able to create a custom field that contains values of all the sprints. Is there any way I can do this?

 

2 answers

Suggest an answer

Log in or Sign up to answer
0 votes
Azamat Dalabayev November 10, 2021

Hi @Harshal 

I managed to solve the same problem thru custom field with type "Label" and Jira automation rules.

Bit more info at the following link:

https://community.atlassian.com/t5/Jira-questions/Add-custom-field-with-Sprints/qaq-p/1274472#U1858682

0 votes
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.
October 10, 2018

You'll need code to do that.

It's not that common to record "found in sprint", as people generally don't care what the sprint was, the date (and version often) determine when fixes for it go into the next sprint.

varun October 18, 2018

Hello Nic,

 

Please help me in how to get the data from the system field Sprint to a custom field.

 

Thank you

Varun

Like davesoft11 likes this
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.
October 18, 2018

For the "set", see https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/postfunctions/set-issue-attributes.html

For a get, I've got this saved 

def sprints = issue.getCustomFieldValue(ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Sprint"))

Note that I use "sprints" because an issue could be, or have been in, many sprints.

varun October 18, 2018

Hello Nic,

I dont think it will work for me,

I want a custom field and I want to fetch all the data in the system field SPRINT,

So that I can select a sprint from that custom field for tracking...

 

Thanks in advance..

Varun 

Like davesoft11 likes this
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.
October 18, 2018

You asked to get the value into a field.

Do you mean you want another sprint field?   That would be a bad idea for your users, and you'd rapidly run into problems with volume unless your code was able to dynamically select during issue create/edit

Sima June 16, 2020

Hi @Nic Brough -Adaptavist-,

I am having the same situation:

Our customer wants a custom field for bugs that basically says "Found in Sprint". It is supposed to be something like a drop down menu where the possible options listed are all of the (passed) sprints. Could you please help me out with this?

Thanks in advance!
Sima

Like Oriyah Barzilay likes this
Sima June 23, 2020

Hi @Harshal ,
Hi @varunbitbucket ,

I am having the same situation with my customer. They too want a "second sprint field" for bugs called "Found in Sprint". What was the solution you implemented for this need?

Thanks in advance.

Sima

Oriyah Barzilay December 31, 2020

@Sima Did you find a solution?

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.
December 31, 2020

The solution is to use the sprint field as it is intended.  "Found in sprint" is not really a useful piece of information (date/time it was found, or in what version of something it was found is far more useful), but if you really do find it useful, you just use a custom text field.  

This is because sprint is not really a data field, it is an indicator of a timebox.

Jira Admin April 19, 2021

We also want a found in sprint field. We find that very usefull

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.
April 19, 2021

See the discussion above.

Note also that I'm not pointing to any apps that would provide a custom field that behaves as a sprint custom field because no-one has seen any value in writing one.

I think the best implementation of this would be a custom field that works the same way custom-versions do - the custom version field draws its options list from the versions in the project, the same list affects and fix versions draw theirs from.  But you don't have a project context for a sprint, nor board, it would have to list every sprint in the system, making it fundamentally non functional after a medium or large user base had been using Jira for a few months.

davesoft11 September 19, 2022

""Found in sprint" is not really a useful piece of information"

Maybe "Found in sprint" isn't useful, but we need to know if the deployment associated with a sprint broke something indicated by a new jira. So we want a custom field "Broke By Deployment" select list which has Sprints pre-populated to select from. 

So if we could simply create a "second Sprint" field and give it a custom label, that would get the job done. Or, if we could create a custom field and tell it to populate the select list with the list of sprints, that would also work.

Like Jasmin Guay likes this
TAGS
AUG Leaders

Atlassian Community Events