Allow scripted fields to be placed in their correct panel (eg. Dates)

James Kosiba February 1, 2016

Summary:  Script Fields in the Date format (Tagged as: Searcher: Date Time Range Picker and Template: Date Time Picker) are sporadically not showing up in the Date panel on the main issue view.

 

This issue originally appeared here: https://answers.atlassian.com/questions/281199

And was later addressed in a fix here: https://jamieechlin.atlassian.net/browse/GRV-430

The issue is, I am seeing it is again a problem in JIRA v7 with ScriptRunner v4.2.0.4.

 

Has support for this feature (showing script date fields in the date panel) been discontinued?  Is it just no longer available in JIRA v7?  Or are there additional configuration changes I need to make to have this function as intended?

 

 

1 answer

0 votes
Kristian Walker _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.
February 5, 2016

Hi James,

I have just looked on my JIRA 7.0 instance and as long as the template for the Script Field is set to be of the Date Time Picker then it will show up in the dates panel of the view issue screen.

For any other return type it will not show up in the Dates panel.

An example of this shown in the scripted the field which is shown in the screenshots below which shows when the issue was last refreshed. Note the search index for the custom field must also be set to Date Time Picker for the field to show up in the dates panel.

image2016-2-5 18:16:16.png

image2016-2-5 18:15:16.png

I hope this helps.

Thanks

Kristian

James Kosiba February 5, 2016

Hello Kristian:

Thanks for the reply.  My issue at this point is that the dates do not always appear one way or the other.  About 60% of the time they will appear on the main view body and the rest of the time they show up on the Date panel.  I have tried multiple things to reset the fields (re-indexing, etc), but nothing I actively do seems to correct the issue.  I will just randomly open a different issue on screen or just refresh my current screen and the fields suddenly pop into the date panel (and not after a set number of refreshes or any other such method that is trackable).

My configuration appears much as yours.  The only difference I see is that I did not explicitly list any imports.

Do the imports need to be explicitly stated for this to work properly?

Thanks,

 

James

Kristian Walker _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.
February 10, 2016

Hi James,

Do you see any errors in the logs or is the field returning no value.

The imports in my example are needed as I need to pull in the Java Simple Date Format and Date classes.

Thanks

Kristian

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events