I would like to create a formula column in Structure which filters for all issues which have a specific label. E.g. if I search for "Apples" it should find all issues where one of the labels is "Apples", e.g. "Apples, Oranges", "Apples, Pears", and "Apples".
I only manage to create a formula which finds issues where the only label is "Apples", but not issues which contain other labels as well.
Any suggestions which formula to use?
Hi Martin,
The simplest approach here would be
IF (SEARCH("Apples", labels) AND !SEARCH(",", labels), "Only apples")
Here it takes advantage of the fact that 0 and undefined are considered false value, so !SEARCH(",", labels) returns 1 if there are no commas in labels string, which means there is only one or no lables at all, for any number it will return 0.
Regards,
Egor Tasa
ALM Works
Thank you very much, Egor! I have the impression though that I don't need the second part AND !SEARCH(",", labels), "Only apples"), the formula seems to work with only the first part
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin,
Not sure that SEARCH("Apples", labels) would work as you expected, but you reminded me of MATCH(labels, "Apples") function that should indeed be sufficient.
Regards,
Egor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, MATCH was my first thought, but that one works only when the labels field contains "Apples" only. That's why I was looking for an alternative, and SEARCH works perfectly. Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, Martin, misread your original requirement. Glad that I could help despite that though.
Cheers,
Egor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.