Using a Date Picker as scripted field in ScriptRunner

I installed ScriptRunner to be able to use the release date of a fix version as a column (to be able to sort on it) and it works fine using a Date Time Picker, but it adds the time to the value of the column (which is always set to 12:00 AM). When I add a regular custom field I can choose between Date Picker and Date Time Picker and it seems that Date Picker has the format that I want. Is there a way to get that type of picker for my scripted field as well?

Something else odd that I noticed is that the time is shown as 12:00 AM, while I have set the time to a 24 hour format in the look and feel section of JIRA. Is there a way to at least show it as a 24 hour format? Every issue now uses two lines in the dashboard, because the text AM does not fit.

2 answers

1 accepted

Hi Mark,

You may consider looking at formatting the value returned using Java Simple Date Format.

I have an example of how to format the date value returned by a scripted field here.

I hope this helps.

Thanks

Kristian

Thanks Kristian,

that will work well enough. I formatted it as YYYY-MM-dd, so sorting on the column will work properly.

Kind regards,

Mark

Hi Mark,

I am glad I was able to help.

Thanks

Kristian

Hi Mark,

This question is a year old! Sorry but we must have missed it. Before we go ahead an answer it - is it still a valid question?

regards,

Mark.

Hello Mark,

I forgot about it, but yes it is still a valid question. I thought I had created an issue for it in the scriptrunner issue tracker, but I'm not sure I can still access that issue tracker, so I can't check.

Kind regards,

Mark

Hi Mark,

If needs be you can use our new Product Support Service Desk portal but we'll try and help you here just the same.

Can I start by asking what version of JIRA and ScriptRunner you are using so we can check what you are referring to?

Hello Mark,

we are using JIRA 6.4.1 with ScriptRunner 3.1.4

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 yesterday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

272 views 4 9
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