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

This widget could not be displayed.

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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

290 views 5 0
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