Transitioning Issue Automatically Depending on the Value of a Field
I'm trying to execute an issue's transition after the issue is created. This depends on the value set in a select list when the issue is filled out and submitted.
I'm referencing these instructions and I was able to get it working.
However, I'm having trouble with the Post Function rule that is set to run. The field that this rule is checking against has options with parenthesis in their naming schema. This seems to conflict with the required syntax in the Post function rule. I've included screenshots of both the working and non-working rules. Is there a way to modify the syntax to include parenthesis in the option names? In this example I want the select list option called Application Implementation (ASAP) to execute the transition Auto Approved when the ticket is created.
Non Working Rule:
Working Rule: Thanks!
If I remove the parenthesis from the option name the rule executes fine.
Thanks!
Comments (4)
-
repo owner -
reporter Thanks for responding so quickly! This worked.
Do regular expressions allow for searching for a similar match vs an exact match?
For example, if possible I would like to have one rule that searches for any options that have (ASAP) at the end of their name. There are 20+ options like this in the select list I'm referencing in the Post Function, and this would cut down on the amount of rules I would have to write.
This logic would be similar to a boolean expression like: %{11807} ~ "(ASAP)"
-
repo owner Yes, you can use the following regular expression:
.*\(ASAP\).*
Your setting rule would be:
(.*\(ASAP\).*)Auto Approved
-
repo owner - changed status to resolved
I close the issue. Please, reopen it if you need further support.
- Log in to comment
Hi Weston,
The problem is that the conditional part of a type 1 setting rule is a regular expression. Parentheses characters have special meaning for regular expression, that's why you should escape them using a backlash (\).
Try the following setting rule: