Hi, I'm looking help to set up a JIRA Automation rule that will label all tickets in a sprint (on sprint start) with a substring of characters from within the sprint name.
The desired label is to be "PI XX.X" where X represents a number and this could occur anywhere in the sprint name.
I have created an automation rule that will work (on sprint start) if this desired substring appears as the first 7 characters in the sprint name, but I want to make this more versatile to be able to find this substring wherever it occurs in the sprint name.
{
"update": {
"labels": [{
"add": "{{sprint.name.substring(0, 7).replace(" ", "_")}}"
}
]
}
}
I have been looking into resolving this with REGEX pattern matching, and have a REGEX pattern that will find the required substring, but I've not yet been able to use this Match to create the desired label:
{
"update": {
"labels": [{
"add": "{{sprint.name.match(PI\s\d{2}\.\d)}}"
}
]
}
}