Hello all,
I need some help:
I want to create an automation for updating one value in the JQL query of specific filters.
For this, I created a REST API call to first GET the JQL query of one specific filter. And then I use the PUT request to change the filter. Overall this is working but I'm struggling with replacing the specific string for my use case:
I want to use the replace function to convert the Customer Go Live (custom field) to the next release.
example JQL query from filter:
project = TRX AND issuetype = Epic AND status not in (Cancelled) AND "Customer Go Live" = "RM 23-17"
> I want to replace only "RM 23-17" with "RM 23-18" - the rest of the query should stay the same
I tested this with a log action and it works after the GET call:
{{webhookResponse.body.jql.replace("RM 23-17"," RM 23-18")}}
But it does not work like this (which is what I need):
{{webhookResponse.body.jql.replace("RM [0-9]{2}-[0-9]{2}"," RM 23-18")}}
And it the PUT call itself I could not get either to work:
{
"jql":"{{webhookResponse.body.jql.replace(\"RM 23-17\",\"MDDM 23-18\")}}"
}
