I am attempting to make a recurring issue automation rule that based on the "Recurrence" custom dropdown field, which has the following options:
Then clones the issue back to the "TO DO" column with the due date incremented when the issue is moved to the "DONE" column on the Kanban.
I have the following smart value but it doesn't match when I select "Weekly" on the dropdown:
{{#if(eq(issue.fields.Recurrence.value, "Weekly"))}}{{issue.duedate.plusWeeks(1)}}{{/}}
{{#if(eq(issue.fields.Recurrence.value, "Every 2 weeks"))}}{{issue.duedate.plusWeeks(2)}}{{/}}
{{#if(eq(issue.fields.Recurrence.value, "Monthly"))}}{{issue.duedate.plusMonths(1)}}{{/}}
{{#if(eq(issue.fields.Recurrence.value, "Every 2 months"))}}{{issue.duedate.plusMonths(2)}}{{/}}
{{#if(eq(issue.fields.Recurrence.value, "Every 3 months"))}}{{issue.duedate.plusMonths(3)}}{{/}}
{{#if(eq(issue.fields.Recurrence.value, "Every 6 months"))}}{{issue.duedate.plusMonths(6)}}{{/}}
{{#if(eq(issue.fields.Recurrence.value, "Yearly"))}}{{issue.duedate.plusYears(1)}}{{/}}
The clone issue action:
The Recurrence dropdown:
I have logged the value of the recurrence as json and it is a string:
I'm using the "next-gen Kanban" project.
Seems like using eq did not work but the combination of .trim().startsWith() did:
{{#if(issue.fields.Recurrence.value.trim().startsWith("Weekly"))}}{{issue.duedate.plusWeeks(1)}}{{/}}
{{#if(issue.fields.Recurrence.value.trim().startsWith("Every 2 weeks"))}}{{issue.duedate.plusWeeks(2)}}{{/}}
{{#if(issue.fields.Recurrence.value.trim().startsWith("Monthly"))}}{{issue.duedate.plusMonths(1)}}{{/}}
{{#if(issue.fields.Recurrence.value.trim().startsWith("Every 2 months"))}}{{issue.duedate.plusMonths(2)}}{{/}}
{{#if(issue.fields.Recurrence.value.trim().startsWith("Every 3 months"))}}{{issue.duedate.plusMonths(3)}}{{/}}
{{#if(issue.fields.Recurrence.value.trim().startsWith("Every 6 months"))}}{{issue.duedate.plusMonths(6)}}{{/}}
{{#if(issue.fields.Recurrence.value.trim().startsWith("Yearly"))}}{{issue.duedate.plusYears(1)}}{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.