Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Smart value with regex to change assignee

Davide Santonocito
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 1, 2024


Good day!

I am desperately trying to automate this flow:

image_2024-10-01_194151105.png
Using this smart value:

{{#issue.comments}} {{body.match("((\w+\.\w+)(?=].*merge request))")}}{{/}}

Sadly, the value is produced with spaces (found out by using "add comment to issue" component)

image_2024-10-01_194432880.png
but I was not able to trim it.

Using:

{{#issue.comments}} {{body.match("((\w+\.\w+)(?=].*merge request))").trim()}}{{/}}

does not solve the issue. I assume I should trim after the loop but I could not find any accepted syntax.

There is naturally also the possibility that the spaces are not the problem and instead I should be changing the assignee of the issue in another way/using a key instead?.

I tried using edit issue field and a custom payload but could not manage either.
Furthermore, I obtain this value by reading the comment left by gitlab integration, hence why I only get the name.surname, that coincidentally is always the same as the name of the jira user.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events