Summary
When using regex conditions (see How to use pattern matching conditioning), there are substitution variables available for any capture group specified in your regex statement. These can be used and provide an indirect way of doing string manipulation. Even if you don't need the condition specifically for determining whether to create an issue or not (just make sure the condition statement is always matches).
Example
This was created to answer this question.
Table plus |
---|
Condition Value | Regex Pattern | Example Substitution Variable Use | Explanation |
---|
%original_key% | ([A-Z]+)-(\d+) | - Issue project from pattern: %pattern1_1%
- Issue number from pattern: %pattern1_2%
- Remove dash from key: %pattern1_1%%pattern1_2%
| This regex has 2 capture groups - characters enclosed by parenthesis. - One for the first part of the key - ([A-Z]+)
- One for the second part of the key - (\d+)
Note that all issues should pass the conditioning as stated, we are just using the condition to generate the replacement variables in this case |
|
Tip |
---|
Title | Project key is available more easily |
---|
title | Easier way to get the project key |
---|
|
%original_project% is a simple way of getting the project key, so the above technique is not needed if this is all you need. |