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[10204] is not EMPTY AND (cf[10204] ~ WEB OR cf[10204] ~ SUS OR cf[10204] ~ POSSEND OR cf[10204] ~ PINOTIF OR cf[10204] ~ PIMAIL OR cf[10204] ~ WRCCTOKEN OR cf[10204] ~ VSATTEST OR cf[10204] ~ WREXTCODE OR cf[10204] ~ WRMASTER OR cf[10204] ~ WRPEDIT OR cf[10204] ~ WRLDSTR OR cf[10204] ~ WRTOPPRULE OR cf[10204] ~ 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
Conditions:
Condition value: %original_customfieldname%, Regex pattern: value1|value2|value3|value4|value5
Thanks,
Amith Mathur
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.