We have a scripted field "Month Created" that takes the month value from the date a JIRA ticket was created. In the Default Configuration Scheme for this field is:
- Searcher: "Free Text Searcher (stats)"
- Template: Text Field (multi-line)
Code is as follows:
import com.atlassian.core.util.DateUtils;
import java.text.SimpleDateFormat;
return new SimpleDateFormat("MMM").format(new Date(issue.getCreated().getTime()))
However, when we display this in our Gadget the Month is not "Ordered by Month" correctly (see column highlighted in red).
OrigGadgetDisplay_MonthCreated.png
We updated the Searcher of the field in the Custom Fields page to "Date and Time Searcher (stats)". After re-indexing JIRA, the custom field is not even recognized (although in the Filter the Month Created values for all 148 tickets remain visible and correct).
MonthCreatedNotShowing_DateTimeSearchTemplate01.png
Could anyone please advise on how to display the value of the scripted field ordered correctly by month?
Thanks!