I have a field of type Issue Picker.
What is correct JQL query to find issues where my field is not populated?
Unfortunately "FIELD is Empty" doesn't work as Jira/ScriptRunner does not support searching for EMPTY values for issue picker.
There is no way to do this I'm afraid. It's a quirk of the search system in Jira and how it makes custom field plugins work - to enable the sub-set search for the issue picker, the code has to tell Jira the field is always populated, even when it's not (this is a terrible explanation, but I don't know how else to keep it simple)
Interesting. I got it to work using the following trick:
issueFunction in issueFieldMatch("", IssuePickerFieldName, "^$")
And yes, I also don't get what's wrong with the Number field. field = 0 returns issues where its 1 also. The searcher is set to Number Searcher, the template is Template Field. The code has only two exit points: return 0 at one place, return 1 at the other branch of execution.
Exactly. However, the template is called "Number field", not "Number". And it turns out that it usually works, but after a change of an issue which changes the number, and re-querying, the result of the query doesn't change, even though it should. Maybe some caching issue? I'll continue observing it, and when I have a working repro I'll write again.
Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...
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