my post function script runner not working when upgrading to jira6.0.8

Hi All,

Im just thinking to migrate my jira to new version. From jira5.2.3 to jira6.0.8.

Im using post script runner to automatically add due date.

However, when testing in jira6.0.8 the script not fuction as it did in jira5.2.3.

This is my simple script.

import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.issue.customfields.CustomFieldType
import com.atlassian.jira.issue.fields.CustomField
import java.sql.Timestamp;
 
MutableIssue myIssue = issue
 
Calendar cal = Calendar.getInstance();

// set due date to: current date + 8 hours
Timestamp mydueDate = new Timestamp(cal.getTimeInMillis()+ 8*1000*60*60);

  
 
myIssue.setDueDate(mydueDate);

Please help me to resolve this issue.

Thank you in advance.

5 answers

0 vote
Henning Tietgens Community Champion Sep 17, 2013

Hi, are there any errors in the log? At wich position in the list of postfunctions is this script?

No error on the catalina. However, I manage to resolve this after upgrade greenhopper plugin.

I got this one more issue, how to display due date field on the ticket?

No error on the catalina. However, I manage to resolve this after upgrade greenhopper plugin.

I got this one more issue, how to display due date field on the ticket?

hello rozuan,

are you updating the issue after you set setDueDate customfield?

0 vote
Henning Tietgens Community Champion Sep 17, 2013

Where do you want to display the due date? In JIRA you can add the due date to the view screen, in JIRA Agile you can add it to the deatils view in the rapid board configuration.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Marketplace Apps

Three tips for boosting your board's efficiency with Story Maps

Trello is one of the most effective tools for driving your sprints. It's customizable for every Agile team and product owners and Scrum masters (SM) love it. However, Agile teams often struggle with:...

832 views 2 9
Read article

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