1-click-child-links icon indicating copy to clipboard operation
1-click-child-links copied to clipboard

apply when with more than one tags is not working

Open SR1901 opened this issue 3 years ago • 3 comments

I have two user storys and want to create 3 different children for each. User Story 1 has the tags M-CITA and Inbound User Story 2 hat the tag M-CITA and NoInbound

I used the following code in the description: User Story 1: { "applywhen":
[ { "System.Tags" : ["M-CITA", "NoInbound"], "System.WorkItemType": "Product Backlog Item" }] }

User Story 2: { "applywhen":
[ { "System.Tags" : ["M-CITA", "Inbound"], "System.WorkItemType": "Product Backlog Item" }] }

For both User Stories the six children are generated by 1-Click. What's the mistake?

SR1901 avatar Jul 16 '21 05:07 SR1901

As I understand it, the Tags condition functions as a "contains one of" type test so, since your user stories both have "M-CITA", they both match. Try just...

User Story 1: { "applywhen": [ { "System.Tags" : ["NoInbound"], "System.WorkItemType": "Product Backlog Item" }] }

User Story 2: { "applywhen": [ { "System.Tags" : ["Inbound"], "System.WorkItemType": "Product Backlog Item" }] }

Although obviously that will only work if you don't have other user stories that would match where you don't want either template to apply. I'm not sure if the following would work in that instance...

User Story 1: { "applywhen": [ { "System.Tags" : ["M-CITA"],"System.Tags" : ["NoInbound"], "System.WorkItemType": "Product Backlog Item" }] }

User Story 2: { "applywhen": [ { "System.Tags" : ["M-CITA"],"System.Tags" : ["Inbound"], "System.WorkItemType": "Product Backlog Item" }] }

mpburtt avatar Jul 16 '21 16:07 mpburtt

I have other stories as well with the same tag, that's why I need both tags. But solution 2 is not working :-(

I tried to integrate another criteria, the title of the backlog story. That works. But is there a possibility to use a wildcard?

{ "applywhen": [ { "System.Tags" : ["M-CITA"], "System.WorkItemType": "Product Backlog Item", "System.Title": "Vorbereitung ohne Inbound" } ] }

=> That work's. But I had User storys where the system.title was integrated, so I did this in the task:

{ "applywhen": [ { "System.Tags" : ["M-CITA"], "System.WorkItemType": "Product Backlog Item", "System.Title": "Vorbereitung ohne Inbound für {System.Title}" } ] } => Unfortunately, that doesn't work. So I was looking for a wildcard: "System.Title": "Vorbereitung*" => But that doesn't work either.

SR1901 avatar Jul 17 '21 20:07 SR1901

Looking through the closed items on this page, it looks like the fix for item #50 may have broken or changed this feature.

I would like to be able to create tasks if I have one tag AND another tag. Instead it treats the AND as an OR.

In the example above, I would need to create one set of 3 tasks if the PBI has M-CITA AND NoInbound tags; and another set of 3 tasks if the PBI has M-CITA AND Inbound tags.

JillLunsford avatar Jul 21 '21 21:07 JillLunsford