I want to get year/month from JIRA due date...

CarmanahTech April 22, 2016

I would like to get the “year/month” from the JIRA issue “Due date” (and hold it in a field in the issue).  

e.g.  “due”= 21/Apr/16

“Misc Custom Field” = 201604  

This will allow us to pivot fields like “remaining estimate” by month, rather than by day. Can someone provide the syntax (and field type) I need to enter into the "Misc Custom" plugin Field to return the values I’m hoping for?  

thanks!

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
David _old account_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2016

You can create a Calculated Text Field with a formula like:

<!-- @@Formula:
duedate=issue.get("duedate");
if (duedate==null) return null;
return String.format("%tY-%tm", duedate, duedate);
-->

And don't forget to choose the "Exact Text Searcher (statistics-compatible)" searcher (in the Edit screen for the custom field).

TAGS
AUG Leaders

Atlassian Community Events