I have the following rule:
When: All Comments
If: Service == placeholder
If Block-
If: Status is Open
Then: Transition to WIP
And: Assign the issue to user who triggered (service account)
And: send web request
Else If-
Elif: Status is not Open
Then: Add value to audit log {{issue.comment}}
And: send web request
If: matches {{issue.comment}} contains regex \w+\.\w+(?=@)
Then: create variable {{ackname}} from {{issue.comment.match("(\w+\.\w+(?=@))")}}
And: assign issue to {{ackname}}
And: add value to audit log 'Ack name is {{ackname}}'
Now what happens is that {{ackname}} is not defined.. actually neither is {{issue.comment}}.. I've googled but cannot find any user-friendly docs on what possible smart values there are for this nor how to use regex with the create variable..
But I bet my entire problem is that I'm not defining the values correctly. If anyone can help I'd be super appreciative.
Hay mate, I'm a little confused, but if it helps:
Howdy!
Ok so I probably coulda left the web request parts out because they are not related to my question.. directly. However I thought including every step of the rule would be appropriate.
The issue is triggered on all comments yes, thanks for the last.body tip! I did tweak the create variable and I now have the email preamble! Next step now is to figure out how to remove the period (.) and replace it with a space.
I am now using: {{issue.comments.last.body.match("(\w+\.\w+(?=@))")}} to define the variable. I'm sure there's a way to make use of .replace on this.
Every person in this Project also has an account on the web request side.. however the only way I can get any sort of reference to the person is this comment, with their email address in the body. So the idea is to set a var with that email preamble (complete!) and now replace the period with a space. Then I can hopefully use the variable to define an Assign User step.
Is there any other way to do what you're looking for? Or are you particularly trying to make the assignee be based on this webrequest and comment comparison?
I don't think so honestly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.