Adding Javascript to create issue screen in Jira 6.1.6.


We have a date picker custom field. We need to set its default value as current date plus 10 days.

I have written a javascript code to set its value and tried to paste it in "createissue-details.jsp".

But it doesnot seem to work.

Please suggest how to use js code on create issue page in JIRA 6.1.6.

Thank you.

1 answer

1 accepted

it's not recommended to use javascript and modify the jsp, but you can do it, putting you script in the description of your custom field in the configuration fields of your issue type.

Look this link it can help you.

Configuring Fields and Screens


where you have put your script?

Thank you zezeto for the reply.

Does it allow simple JS or only AJS can be used?

I am using the following code:


var endDate= document.getElementById("customfield_id");
if (endDate)
var today=new Date();

Although it does't work.

But when I try it with browser(Firebug), it appear to work well.

Please suggest!


I have put the js code in Description of datePicker custom field.

Suggest an answer

Log in or Join to answer
Community showcase
Maarten Cautreels
Posted Thursday in Off-topic

Friday Fun: What's your favourite beer/drink

As a Belgian, beer-lover and home brewer, beer is one of my great passions. I love the fact that with just a few ingredients (usually just water, hop and malt) you can create so many different tastes...

285 views 38 9
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot