It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Struggling with "label does not contain" (where one or more labels are present)

All the literature seems to be for the postive case "find this label or empty" but we're trying to flag issues where the label contains "anything BUT".

"Blocked By" is a custom label field, but I presume works with the same operators as the system label field. 

Something like this: 

"Team Assignment" = MyTeam AND "Blocked By" IS NOT EMPTY AND "Blocked By" NOT IN ("MyTeam")

We want to see results where: 

  • Blocked By = YourTeam
  • Blocked By = YourTeam, MyTeam

We don't want to see results where: 

  • Blocked By = MyTeam
  • Blocked By IS EMPTY

 

 

1 answer

Hi @Iain McCarthy

"Team Assignment" = MyTeam AND ("Blocked By" != MyTeam OR ("Blocked By" = YourTeam and "Blocked By" = MyTeam)) 

^ Something like this is going to work - this provides all issues:

  • In the Team Assignment MyTeam
  • Which aren't blocked by MyTeam or...
  • Are blocked by both MyTeam and YourTeam

I think the difficulty here is how do you define the other teams? And how many are there? 

The other thing I wondered was if they're blocked by your team and their team - do these belong to another team also? So could you do something like:

"Team Assignment = MyTeam" AND "Blocked By" != MyTeam OR "Team Assignment" != MyTeam AND "Blocked By" = MyTeam

^ This provides both your own issues without blocked issues - and issues from other teams where you are reliant. Not sure if this matches up with exactly what you need though.

Let me know if either work or if not, how we can help further.

Ste

Thanks Ste,

I appreciate the suggestions. The trouble is there are many teams, and there doesn't appear to be a neat way of saying a label set "contains things other than x" in JQL.

In lieu of a function or operator, we've got something working based on the below.

Step 1: Define a Filter based upon [all other teams] which gives me the issues solely blocked by my team.

MyTeam_Blocks:

"Blocked By" = MyTeam AND "Blocked By" not in (OtherTeam1, OtherTeam2, OtherTeam3, OtherTeam4, OtherTeam5, OtherTeam6, OtherTeam7, OtherTeam8)

Step 2: Exclude the results of that filter in the query

"Team Assignment" = MyTeam AND "Blocked By" IS NOT EMPTY AND filter!=MyTeam_Blocks

This gives us the results we need, though there may be more efficient ways of accomplishing this! There would be a maintenance overhead, ongoing, as we'd need one of these per team in a set that may expand and contract.

Thoughts welcome, cheers!

Iain

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

375 views 1 3
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you