how can i set duedate before issue created ?

I am using SetDueDate() function in my post function on jira scripting suite. This page says https://docs.atlassian.com/jira/6.3.1/com/atlassian/jira/issue/MutableIssue.htmlafter calling any setter method i need to call store() method. But store method is deprecated. I need another update method before issue created. is there any example ?

Please help me.

Thanks for answers.

2 answers

1 accepted

This widget could not be displayed.

If you want to set due date inside issue creation transition - you should just use the same issue object as provided for you, but don't use store method() for uncreated issues. Just set due date and place postfunction on the first place in the postfunction list.

This widget could not be displayed.
This is my code. When i delete store it doesnt set due date. How can i do that. Also my post function is in first place.

from com.atlassian.jira import ComponentManager
from com.atlassian.jira.issue import Issue
from java.sql import Timestamp
import java
import time
from java.util import Calendar

cal = Calendar.getInstance();


ts=long(cal.getTimeInMillis()+ 1000*2*60*60)
issue.setDueDate(java.sql.Timestamp(ts))


issue.store()

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

97 views 1 0
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