I have all my issues with different dates and I need to create automation, which will create the same issue after 1 year. I have added a custom field like "Training date" in my project. For each issue, it's a different date, so I can't say that it should create an issue after 1 year, it should be a specific date for each issue.
How to do this?
Thanks
Hi @Vladimir Sumilin ,
You can try to built this automation:
The JQL I would use in this case as part of the scheduled trigger is Project = xxx and training date = startOfDay(-1y)
Hope it helps!
Magdalena Zhisheva
Hi Magdalena,
I'm getting an error when I'm trying to make it as you said:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try `Project = "Training Records" and "Training Date" - startOfDay(-1Y)`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Kelly,
Thanks for the reply, but I still have an error:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Augh!!!! I had a typo in my response to you. My apologies. Try:
`Project = "Training Records" and "Training Date" = startOfDay(-1Y)`
Sorry about that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But it seems that "Training Records" is not a valid value for the "Project" field in your Jira instance, so I think you'll need to figure out what project you want to query, or investigate whether your Jira instance has two fields named project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would add to use project key instead of the project name.
When I have troubles with JQL in Automation rules, I usually go to Filters -> Advanced search in a new tab and build the query there first with the suggestions list, so I can be sure that it's working. Once it's working, you can paste it to the Automation rule.
Hope it helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your replies,
Jira can understand now the project name, because I am using only the project key, but he gave me another error about startOfDay.
My JQL:
Project = "TR" and "Training Date" = startOfDay(-1Y)
Error:
Duration for function 'startOfDay' should have the format (+/-)n(yMwdm), e.g -1M for 1 month earlier.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found out why I had the last problem because Y should be small y and then it's working. Thanks for the help guys! :)
I have only one concern that it says it will start the next Thursday. Please check the screenshot below:
Is the basic also working or I chose that JQL only will work?
Thank you anyway! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vladimir Sumilin ,
Please, check my screenshotYou may schedule to run every day, so the JQL check will trigger any further actions.
Let me know if you need any other details
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Magdalena,
I'm confused now. I will try to explain my concern.
I have this query in JQL:
Project = "TR" and "Training Date" = startOfDay(-1y)
My question: is it only this query working? (I need to make it only once a year)
But for me it's saying that it will run next Thursday, what I actually don't need.
Best regards,
Vladimir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vladimir Sumilin ,
The rule I proposed means:
Everyday perform a search for tickets where the training date is on the same date last year and clone it.
So you need to schedule it to perform the check every day and if there is an ticket with a training date on the same date last year, it will be cloned.
Hope it makes sense!
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.
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.