Display version release date in issue

Gregory Demotchkine December 4, 2013

How could I display the version release date on an issue ?

In fact I don't want to put the release date in the version name, I want to display the field release date as a separate field on an issue... I've look in the field config, but there's not field like this.

Maybe I could calculate it somehow ?

4 answers

1 vote
Stephan Hostie February 15, 2015

Hello,

how to get the version release date out of a single version picker field?

1 vote
Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 4, 2013

You could use Script Runner plugin and create a scripted field which reads the versions from the issue and displays the release dates.

Gregory Demotchkine December 4, 2013

Thanks I'll give it a shot.

Any tips on how to create the formule or syntax for this need?

Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 4, 2013

If you use a Date Time template for the scripted field you could try something like this:

Date releaseDate = null
issue.fixVersions?.each{releaseDate = it.releaseDate}
return releaseDate

This returns the release date of the last version found for the issue or null if no versions found (or no release date).

Stephan Hostie June 3, 2014

Hi!

A problem with this is the data type. I didn t find a way to use the date (for comparison) in scripts or filters.

Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 3, 2014

What's the problem with the scripted field? Normally you should be able to use the field in filters. Make sure you configured the scripted field for using the Date Time Template and a corresponding search template.

Stephan Hostie June 4, 2014

Yes, something went wrong with the reindexing. Now working fine.

Leandro S July 24, 2014

Hi,

Is it possible to generate the value in DD / MM / YYYY format? Without the time?

Thanks

Venkat Krishnamoorthy January 4, 2017

Hi Leandro,

Were you able to get the date formatted? I am having the same problem, I am autopopulating a date picker field and I just want the date format without time.

 

import com.atlassian.jira.project.version.Version

def fixVersions = getFieldById(getFieldChanged())
def Proddate = getFieldByName("Prod Date")

Collection<Version> fixVersionsValue = (Collection<Version>) fixVersions.getValue()

Proddate.setFormValue(fixVersionsValue.releaseDate)

 

Thanks.

roger layani March 13, 2017

if someone can answer when this script executed only 1 time the version is released or each time this issue is viewed in a filter?

0 votes
Gregory Demotchkine December 4, 2013

@Peter - yes, I've thought about this, and the reponse would be to always have only one fixversion value which is normaly our case, as we only manage the release versions and not patches.

0 votes
Peter Van de Voorde
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 4, 2013

Just wondering, as an issue can be part of several versions (both fix and affects) how will you choose which release date to show?

Couldn't you just better set a due date for the issue?

Best regards,

Peter

Suggest an answer

Log in or Sign up to answer