Format date returned by getReleaseDate()


I have the following behaviour script that on a create screen, based on "FixVersion" selection, autopopulate "Prod Date" field with selected FixVersion's Release Date. The script works in a way it does pull the release date and auto populate the "Prod Date" field. But I would like date to be formatted in default JIRA format (e.g. 15/Feb/17).

Any assistance here would be much appreciated.



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

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

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

def reldate = fixVersionsValue.releaseDate




3 answers

0 vote
Vasiliy Zverev Community Champion Feb 01, 2017

What type ProdDate is? Is it a text or date field?

Thanks for responding, Vasiliy.

Its a date field.

0 vote

Hi Jamie,

The date formatting isnt working for me. Please see screenshot.


date format.jpg

Because you've got a collection of Version objects. Do you want the release date from the first, the last, or what?

for the first you could use:


Thanks Jamie, that worked.


Could you also help troubleshoot the Rest endpoint

I am trying to achieve the following - In the same JIRA instance, I would like to pull Issues from one JIRA project to another and display the list as a select pulldown list.

With limited background in this, I am having trouble understanding why I dont see any Issues when I invoke the endpoint from the browser.



Does that have anything to do with this question?

No, it does not. I provided the link to the other thread, hoping you could help me there.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

136 views 0 4
Read article

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