Set a field in transition view after transition started and before displayed on screen

Ops Lead March 5, 2012

Hi,

we want to set 'Due Date' to <tomorrow> as a default value for the transition view.

How can we do that?

Thanks in advance

1 answer

1 accepted

0 votes
Answer accepted
Maya S Chase
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.
March 5, 2012

This is a little kludgy, but I think it would work. Create a custom date field that is defaulted to the value <tomorrow>. Add it to the screen, but in the field configuration, make it a hidden field. On the transition that has the view, set a post function to "Copy Value From Field to Field" and copy from your hidden field to the Due Date field.

The real difficulty comes because JIRA doesn't do relative dates - you can set a default date of today, or a specific date, but not something like "today + 1". However, there is a previous Answers entry on this, which should do the trick: https://answers.atlassian.com/questions/1554/can-custom-date-fields-be-defaulted-to-a-value-relative-from-today

Ops Lead March 6, 2012

This aproach would work only once in the life of an issue.

I want to set a field for the transition view between the user started the transition and before the view is displayed. How can I put a script - may called pre-transview-function or begin-transition-function - into the workflow?

JamieA
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.
March 6, 2012

You can't do it with workflow functions... typically it's done using javascript.

Ops Lead March 6, 2012

Does that become better with Jira-5?

Ops Lead October 21, 2012

I'm asked to accept the answer despite there is an unanswered question.

Ok, I like to be a "good Answers citizen" and will click to accept.

Suggest an answer

Log in or Sign up to answer