document.forms.jiraform.duedate.value = return_val;
What about creating a listener to manage all events from you project?
If JS doesn't work for you, this may be a valid alternative.
The listener should check if the event is coming from a "controlled project" and check if the due date equals to calculated due date ...
I have decided to use a Groovy script as a post-function and have this working for one transition where the dependent fields can be modified. However it is not working when I add it as a post-function to the Create transition. The script uses the following:
MutableIssue mutableIssue = (MutableIssue) issue;
def setDueDate = mutableIssue.getDueDate();
// Calculates newDueDateCal based on other field values
Timestamp dueDate = new Timestamp(newDueDateCal.getTimeInMillis());
log.debug "Setting Due Date to " + newDueDateCal.format("dd/MMM/yyyy");
The script is running and calculates a newDueDateCal correctly, as shown by the debug output. However the issue that is created does not have the Due Date set.
Try placing your postfunction the first in the postfunction list in the create step
Maybe you could use jira behavoiurs plugin?
From the plugin description:
The behaviours plugin allows an administrator to create one more or behaviours, which can be thought of as "Behaviour Schemes". A behaviour defines how fields behave. Some examples of behaviours are:
Setting a field value dependent on other form data
Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...
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!
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
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot