Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Custom Field [Label] where is EMPTY is Returning All Issues

We are using JIRA next-gen and have added a custom field (called Affected version) for defects.  The problem is, when I query for records without a value, it returns ALL the issues!

The query is simple: project = "CC" AND Type = Defect AND "Affected Version[Labels]" is EMPTY ORDER BY created DESC

I've done this many times in JIRA Server, so I'm very confused.  Why is it doing this?

 

1 answer

1 accepted

0 votes
Answer accepted

Hi @Arlan LaVoie  -- Welcome to the Atlassian Community!

You note adding a custom field called Affected Version.  What is the field type for that one?

There is already a built-in field called affectedVersion.  What is the need for a new field?

If your new field is a text type, there is definitely an existing/open defect for IS EMPTY not working if the field has *ever* had a value before.  (Atlassian is working on fixing that one...)  If that fits your use case, you could try this:

project = "CC"
AND Type = Defect
AND "Affected Version[Labels]" = ""
ORDER BY created DESC

Best regards,

Bill

Thanks for the response.  The field type is "Labels".  I added it because I could not find an existing field for affectedVersion.  This is on JIRA Next-Gen and I just checked again to be sure, but it's not there for me.

Yup, I just found the suggestion to add that field for Next-Gen (now called Team-Managed Projects).  You may watch/vote for it here:

https://jira.atlassian.com/browse/JSWCLOUD-18747

Did that query help?

Unfortunately it did not.  That query return 0 issues (I have one that is empty so it should have found it.  I'm not sure how to deal with this - I have no way to identify when people forget to set that value.

After some backlog checking, I wonder if you are facing this issue related to project-level custom fields: https://jira.atlassian.com/browse/JRACLOUD-76482

If so, the work-around is to use the custom field number rather than the name in the query.  Please let me know if that helps you.  Thanks!

I'd love to try that - do you know where to find the cf ID in Next-Gen?  I'm looking in Issue Types area where you set them up - but it doesn't appear anywhere.

Well rats.  I found the cf ID via the API  and tried it, but it also returned all the issues (even those with a value in the field.

You could ask your site admin for it, or quickly call the REST API.  Here's how to do that:

  • Find an issue in your Next-Gen project that has a value in the field
  • Make this REST API call in a browser tab to grab the JSON, substituting in your company and issue key:

myCompanyJira.atlassian.net/rest/api/2/issue/myTestIssueKey?expand=names

  • Search the results for your custom field name.  There should be a custom field number near it.
  • Using that custom field number, search again to confirm you see the value you expected
  • With that confirmed, you can now use the custom field number in query to test for IS EMPTY

Well, that is unfortunate.  At this point I am unclear what else to try.  If you are on a paid-instance of Jira (Standard or Premier, not Free), I recommend asking your site admin to submit an incident to Atlassian here: https://support.atlassian.com/contact/#/

You have enough diagnosis steps and have tried their work-arounds, so perhaps they can see something in your instance that we are missing. 

Once you hear back from them, please consider posting back here so the community can learn too.  Thanks!

Thanks much for your help - Arlan

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Team-managed projects

4 steps to get actual statuses on the Jira board.

Jira   is a powerful tool   that helps teams to plan, manage, and report on their work.   We love using Jira, especially for its ability to track issue progress. But how to monitor the...

1,174 views 10 14
Read article

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