Sometimes we have repetitive tasks which needs to be assigned to different assignees.
I created an automation to read the last comment and create Stories from this.
For example, last comment is:
Server1
Server2
Server3
By triggering a manual automation from the Epic, it will create Stories and subtasks.
For example:
EPIC: Decommission Servers 2024 Q2
Story: Decommission Server1
Subtask: Task1
Subtask: Task2
Story: Decommission Server2
Subtask: Task1
Subtask: Task2
Story: Decommission Server3
Subtask: Task1
Subtask: Task2
So far so good.
Now I like to change the comment to:
Server1-John Doe
Server2-Don Johnson
Server3-David Hasselhoff
So I like to read each line, already working with {{issue.comments.last.body.split("\n")}} and split the server name and username. The user name should be the Assignee for the story and subtasks at the end of the automation.
First creating a variable Servername from {{issue.comments.last.body.split("\n")}}
This works for the name of the Story:
Decommission {{Servername.split("-").get(0)}}
It creates Stories with subtasks with the correct name.
I can't seem to get it to work for the assignee, the other part of the splitted variable. I tried the advance options to add the name to the assignee filend, but this doesn't work:
{
"fields": {
"assignee": { "id": "{{Servername.split('-').last}}" }
}
}
Any idea what I am missing?
Hi @Marcel Huisman ,
Maybe you can try the name instead. Just make sure the name is exactly same indicated in user.
{
"fields": {
"assignee": { "name": "{{Servername.split('-').last}}" }
}
}
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.