Hi everyone,
I have set up a basic automation that clones certain issues (based on components) on the 1st of each month. However I have ran into two issues.
Right now the automation changes the issue summary, adding the first three letters of the current month to the issue summary (see attached picture). However, I need to add the past month and not the current one. Maybe you guys can help me out on how the smart value should look for this to happen.
The second issue is that if for example, a ticket called "Test 123" gets cloned by the automation on the 1st of next month the new issue wil be called "Test 123 Jun", However, if the same automation goes off again the month after, won't the title look like this "Test 123 Jun Jul". Is there a way to prevent this from happening? For the newly cloned ticket I want only the original issue summary with the first three letters MMM from the past month in it.
As always, thanks everybody in advance for having a look at my questions!
Hi Rafael,
For your first need, try this: {{now.minusMonths(1).format("MMMM")}}
For the second, it will do what you are describing and tack on Jun Jul. One way to handle this is to always add a dash and then the month. So Test 123 - Jun. Then you could try to substring out the Issue Summary to right before the dash and then add on your new month as normal.
Hi John,
thanks to your reply I got the first part working!
Could you elaborate a bit more on the substring function?
How would I go about to implement that functionality in practice / how would the smart value prompt look like to achieve this?
Thanks again for helping out!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, and...to John's suggestions:
Are you trying to only update the newly cloned issue or others cloned in the past?
If you only want to update the new one, please change your branch type to Most Recently Created Issue.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
There are multiple issues that need to be cloned each month, to prevent older issues from being cloned again I have checked the box for "Only include issues that have changed since the last time this rule executed".
For the second issue that I had with the substring as @John Funk mentioned, I have found this to work:
{{issue.summary.substringBefore("-")}} {{now.minusMonths(1).format("MMMM")}}
I will mark this thread as solved, thanks everyone for helping out!
Kind regards,
Rafael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.