I've been using the COT plugin for a while and finding it really helpful. I have a new requirement that I'm a bit stumped on, though, and I'm wondering if the conditions are just too much for this plugin. And if so, what other options do I have?
We have a custom multi-line text field called Code Objects that are used with one specific component. I need to create a subtask on transition if there's a partial or complete match in that field for a specified list (array?) of strings. Basically, if the issue being transitioned would be found by the following JQL, a subtask needs to be created.
project = PH AND cf is not EMPTY AND (cf ~ WEB OR cf ~ SUS OR cf ~ POSSEND OR cf ~ PINOTIF OR cf ~ PIMAIL OR cf ~ WRCCTOKEN OR cf ~ VSATTEST OR cf ~ WREXTCODE OR cf ~ WRMASTER OR cf ~ WRPEDIT OR cf ~ WRLDSTR OR cf ~ WRTOPPRULE OR cf ~ OUTOFPROD)
Is this possible? It seems a bit much for a regex.
The JQL query should work. However, you just need to replace the custom field id with the custom field name in the JQL of the Create on Transition post function. Ensure to use % at the start and end of the custom field name.
project = PH AND %customfieldname% is not EMPTY AND (%customfieldname% ~ WEB OR %customfieldname% ~ SUS OR %customfieldname% ~ POSSEND OR %customfieldname% ~ PINOTIF OR %customfieldname% ~ PIMAIL OR %customfieldname% ~ WRCCTOKEN OR %customfieldname% ~ VSATTEST OR %customfieldname% ~ WREXTCODE OR %customfieldname% ~ WRMASTER OR %customfieldname% ~ WRPEDIT OR %customfieldname% ~ WRLDSTR OR %customfieldname% ~ WRTOPPRULE OR %customfieldname% ~ OUTOFPROD)
Alternatively, you can also use the | symbol for the values as shown below
Condition value: %original_customfieldname%, Regex pattern: value1|value2|value3|value4|value5
It's good to know that it SHOULD work; I just can't seem to make it happen. In the interest of simplifying during testing, I tried setting up only one string to search for.
Here's my setup (note that the Create Subtask postfunction is actually the final step, after the Generic Event; I just took the screenshot before moving it):
And here's a search to show that there is at least one ticket that should match the regex I set up. In that ticket, the value in the multi-line custom field is "WRPEDIT.int", which according to RegExr does match the expression I'm using in the regex.
So where am I going wrong?
Gaining insight into your team’s effectiveness and choosing the right estimation technique. Estimating projects is hard. It is because people have the tendency to underestimate the time thin...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs