Why does this happen, and what can I do?
I think it happens when $value is null. Do a null check in the velocity template where the formatting is done and you should be fine!
The value should not be null, as it is a Last Resolution Date and the issue is resolved.
I didn't do anything but create a custom field as Last Resolution Date and added it to my view. Then I resolved a test issue and found that sting on the page.
Might be an issue with JIRA version. See https://studio.plugins.atlassian.com/browse/JCHART-395 for a similar issue. I will raise a fault with JIRA Toolkit plugin if you are using it.
Thanks for pointing me to https://studio.plugins.atlassian.com/browse/JCHART-395 that solved the problem!
Thanks - got the same problem and the same answer!
But I saw on screenshot, that custom field placed in date area. My date CF is placed in main custom field area...
https://studio.plugins.atlassian.com/secure/attachment/18432/Jira+4.4+error+screenshot.jpg
How can I chanhge location of my custom field?
Thanks.
Also I found another way to fix it without jira hackig:
1. Add constructor parameter private final DateFieldFormat dateFieldFormat;
2. Override getVelocityParameters method:
@Overridepublic Map<String, Object> getVelocityParameters(Issue issue, CustomField field, FieldLayoutItem fieldLayoutItem) { final Map<String, Object> map = super.getVelocityParameters(issue, field, fieldLayoutItem); map.put("dateFieldFormat", dateFieldFormat); return map;}
For me it wasn't necesarry to put datePickerFormatter to velocity params (I run plugin SDK vith jira.version 4.4), but if you need it, you can add map.put("datePickerFormatter", dateTimeFormatterFactory.formatter().forLoggedInUser().withStyle(DateTimeStyle.DATE_TIME_PICKER));
Hope, it helps
It looks like you're new here. Sign in or register to get started.