To my problem. To make it easier for a few teams, we create issues for them automatically every working day, so they just have to fill in their actual number for this day. In this case it is the daily headcount.
Due to the fact that not every day the numbers change, I would like to change the automation, that the values of the previous day get copied - if they afterwards change the values manually, these new numbers shall be copied to the next days issues.
This is how my automation looks like - very simple, just creating issues for all teams. But with now values. I know how to set them fix, but I want it to be dynamic, so always the "latest" one is set for the next day
Hi @Nadine Arnold ,
It looks like you are doing this for different teams at the same time?
First you should identify the latest issue for the correct team.
You could do this by searching for the issues with a JQL.
for example:
issuetype = Headcount AND reporter = "Automation for Jira" AND Factory = REC-2 AND Department = REC-46 AND "Org team" = REC-48 AND created > -10d ORDER BY created DESC
-> This wil get you a list of issues created by A4J for that team in the last 10 days. Ordering by created makes sure the last issue is the first one in the list.
-> I use a list of the last 10 days, wo make sure even after weekend, holidays,.. there will always be an earlier issue in scope. Adjust to your preference.
Secondly, Now that we have identified the correct issue, we need to get the value of that issue in a smart value so you can use it to create the next one.
You can find info about working with lists here.
So, before every "Create issue" action in your rule, you first need to do a "lookup issues" with the correct query (see my example and ammend to make sure you get the correct issues)
After that, you need an action "Create variable" and get the value from the issue with this format:
{{lookupIssues.first.customfield_xxx}}
After first. -> use the customfield_id format if you know the id of the field, or jsut use the name if you prefer (but not best practice).
Name your variable somthing easy and use that as the smart value in your creation.
Please try this out and see if it works for you.
- Tessa
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.