Hi Atlassian Community;
I am using a Create / Clone Issue(s) Post-function through JMWE and am trying to set up a recurring type workflow with an Audit style issue process.
To simplify it, I have the following setup.
Custom Field A: Issue Frequency
Custom Field B: Due Date
On the very first initial issue creation, the creator specifies the Due Date and the Frequency.
As the issue moves through the workflow, on the In-Progress --> Done Transition, the Create/Clone post-function kicks in and creates a new issue with select fields that copy over.
For the date, I want the 'Due Date' to change from the initial due date to be either
Based on the Issue Frequency selected.
Is there a way to do this on the Set Field value to Groovy Expression within the Set Fields of New Issue in the Post-Function.
Thank you in advance.
Dillon
Hi @Dillon ,
In the "Create / Clone issue(s) (JMWE app)" post-function, select the "Due Date" field under "Set fields of new issue" and add the below "Groovy Expression"
if(!!issue.get("duedate")) {
switch(issue.get("customfield_10300")) {
case "Weekly": return (issue.get("duedate") + 7)
case "Bi-Weekly": return (issue.get("duedate") + 14)
case "Monthly": return (issue.get("duedate") + 31)
}
}
Replace 10300 with the id of the 'Frequency' field.
We have opened a support ticket in the Innovalog support portal to better track your request. However, we couldn't add you as a reporter. Please sign up using this link and share the user name/id. We'll then add you as the reporter and confirm.
Regards,
Suprija
In the same Create / Clone Issue(s) Post Function by JMWE
, I am creating 2 Tasks with 2 different summaries and custom field populated with 2 different corresponding drop-down values
if summary = "Summary1" then its corresponding studio custom-field ID 20001 value is value1
and if summary = "Summary2" then its corresponding custom-field ID 20001 value is value2
On the studio field, we are setting field value to a groovy expression as below
if(issue.get("summary")) {
switch(issue.get("customfield_20001")) {
case "Summary1": return (issue.get("value1"))
case "Summary2": return (issue.get("value2"))
}
}
Result value is null.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.