Hello,
I am running JIRA 7.2.4 and Adaptavist Scriptrunner for JIRA 4.3.15.
While writing a Gadget Plugin, i wanted to place a DateField picker, where you can chose a DateField that shall be used for displaying something. I figured Jira has an already built in REST interface with: /rest/gadget/1.0/dateFields to get all DateFields. The Problem is, that the ScriptedFields have a different CustomFieldType than DateField (CustomGroovyField).
I do have some scripted fields that have date picker as search template where they calculate their dates from other data, so they are basically date fields but they are not derived from DateField.
For now I copied the REST interface and manually add them to the list (by name). Is there a generic way to determine the underlying type of a scripted field, or any other more elegant solution to this problem?
Example:
for (final Field field : navigableFields) {
if (isDateTypeField(field) || field.getName().equals("Currently planned begin")) {
fields.add(new DateFieldBean(field.getId(), field.getName()));
}
}