It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA Misc Custom Fields: Calculated Date/Time Field

Hi!

How do I set up a customfield to display only month from other customfield best in format 09/2016?

 

2 answers

Hi,

since this is not a standard display format for dates in JIRA, you need to create a Calculated Text field that will contain the string representation of the date in the format you want. Note however that this will not work well for sorting (you'll need to sort on the original field instead).

The formula of the calculated text field will be something like:

<!-- @@Formula:
value = issue.get("customfield");
if (value==null)
 return null;
df = new java.text.SimpleDateFormat("MM/yyyy");
return df.format(value);
-->

where customfield is the name of the date field you want to format (see https://innovalog.atlassian.net/wiki/display/KB/Using+issue.get%28%3Cfield_name%3E%29+in+scripts).

As for your second question, you first create a "Transition Date/time" field (see https://innovalog.atlassian.net/wiki/spaces/JMCF/overview) which you then use in a calculated text field as above.

David

Thanks David.


What do I enter as customfield? Name or ID?

 

 

Both will work, as stated in the documentation.

hi, David,

 

can I know how to do the calculation to add date ?

My calculated date time field formula as

<!-- @@Formula:(issue.get("customfield_10805") == null ? null : issue.get("customfield_10805")-60) -->

<!-- @@ format: DATE  -->

 

It doesn't work. it only work ; it only work w/o calculation ( exclude -60.

 

Thanks in advance

And second question:

How do I set up a customfield that will show date(month) of last transition to particular status?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

1,099 views 7 0
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you