Duedate default value when creating issue

Atis Slisans September 11, 2012

Is it possible to set default value for Duedate on Create Issue Screen?

For example - Due Date would be +3 days from today.

JIRA 4.1.2

3 answers

2 votes
Ihor Tretyakov October 3, 2017

JIRA 7.5

Go to Administration/Issues/Field configurations/Configure

On DueDate fiel click Edit

Put this code in Description

<script type="text/javascript">

var today=new Date();
var dd=today.getDate();
var mm=today.getMonth()+1; //January is 0!
var yyyy=today.getFullYear();
if(dd<10){dd='0'+dd};
if(mm<10){mm='0'+mm};
today=dd+'.'+mm+'.'+yyyy;

dueDateField = AJS.$("#duedate");

if (!dueDateField.val())
{
dueDateField.val(today);
};

</script>
Kristiyan Nachov February 3, 2021

Hello,

 

I dont understand javascript. Can you tell me how to change this script to show the last day of the month?

 

BR

2 votes
John Chin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 18, 2012

Hi adminltt,

The feature seem not available in current JIRA. I notice there is feature request raise to our Atlassian developer to wok on it. You could refer to this ticket JRA-11770. I sugges you to vote on it for popularity of issue and add yourself as watch list to keep you updated in future. Good Luck

Regards,

John Chin

Deleted user March 27, 2013

I don't see JIRA-11770 as providing the solution that this person is asking about. I'm also interested in having the Due Date selector open with a default that automatically looks at the date value of "today" and automatically defaults to "add" days to that value.

My problem is that users can currently select a due date in the past and JIRA accepts it. As a workaround, having a default that is 3 days in the future would at least point them in the right direction.

0 votes
Darrell_Bunger July 20, 2016

Agree, that ticket does not address being able to assign a default value to the system field duedate, +2 weeks or whatever your choice is.  It is now closed.  

A workaround would be to create another duedatex field as a custom field and use that field but that would involve having to go back into your system and remove the duedate and then insert your custom duedatex field in its place.  

I personally don't like workarounds especially for simple fixes.  This should be a simple implementation of a feature to set defaults to the system fields as well as custom fields.

Paula Manildi August 2, 2016

I just installed Quick Sub-Tasks, which gives a way to create multiple sub-tasks fast. The syntax there for a due date would be, for example, "@now+2w". That is what I was expecting to see in setting the default value for a custom date picker field, but alas, only "current date" or a particular date are available.

Suggest an answer

Log in or Sign up to answer