Two dimensional filter statistics gadget: drill down on Sprint doesn't work

Dave Edwards August 29, 2022

I have a two dimensional filter statistics gadget with Priority on the X axis and Sprint on the Y axis.  It works fine until I try to drill down on any of the numbers displayed.  I get:

The operator '=' is not supported by the 'Sprint' field.

It seems the gadget isn't constructing the correct JQL for the drill down.  Is this a bug or am I doing something wrong?

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 29, 2022

Hello @Dave Edwards 

Welcome to the community.

What is the JQL you have configured the gadget to use?

What is the JQL that displays when you try to drill down?

Are you applying this to a Company Managed project or a Team Managed project?

Dave Edwards August 31, 2022

Thanks for the response.  This is a Company Managed project.  The JQL in the filter used by the gadget is:

project = GOLD AND issuetype in (Bug, Story) AND status in ("Status 1", "Status 2", "Status 3") AND labels = Prod_impact order by created DESC

The JQL generated by the drill down in the gadget is:

project = GOLD AND issuetype in (Bug, Story) AND status in ("Status 1", "Status 2", "Status 3") AND labels = Prod_impact AND Sprint = 784 AND priority = High

(The latter is what was generated by clicking on the number in the cell corresponding to a certain sprint and the "High" priority.)

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 31, 2022

Hm, that is very odd since the 'equals' operator is most definitely supported for the built-in Sprint field.

Do you happen to have more than one custom field named Sprint? Jira does allow for the creation of multiple custom fields with identical names. I'm wondering if the click-through filter might be picking up an alternate custom field also named Sprint.

Dave Edwards September 1, 2022

I think you're onto something.  When I enter raw JQL, autocomplete for Sprint shows two options: "cf[10003]" and "Sprint[short text]".  The '=' operator works for cf[10003] but not for Sprint[short text].

That said, in project settings under issues->fields it only lists one Sprint field.

Any suggestions on how I can clean this up?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 1, 2022

I would recommend changing the name of the second Sprint (short text) field to something else, or if it is not used in any projects, then delete it.

If the field is associated to screens and projects, renaming it could break filters (and potentially boards) that may be relying on it. Exercise due diligence to find out the origin and usage of the field before changing its name.

And have a chat with all the people who have Jira Administration access to educate them on best practices for creating custom fields, which includes not duplicating the name of an existing field.

Dave Edwards September 2, 2022

Let me see if I understand.  By experimenting, I found the custom field (cf[10003]) works with the '=' operator and the (apparently) standard field (Sprint (short text)) does not.  So you're recommending to change the name or delete the standard field?  Am I able to do that?  If so, how?  By the way, the custom field type is listed as "Jira Sprint field".

I'm having a hard time interpreting the Jira documentation relative to all this.  It lists the Sprint standard field as a Number type, not Short text or Jira Sprint field.  And it also seems to say standard fields can't be renamed.  But I'm not always clear if the documentation I'm looking at is for the right version of Jira.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 2, 2022

Yes, I am recommending that you change the name of the "Sprint (short text)" field, or delete it entirely if it is not used by any screens. You can do that through the Custom Fields screen (from the gear icon select Issues, then Custom Fields should become available in the navigation pane).

What documentation are you viewing?

This is the correct documentation for managing Custom Fields in Jira Cloud.

https://support.atlassian.com/jira-cloud-administration/docs/create-a-custom-field/

Can you provide a screen image from the Custom Fields screen for the results of searching for a field named "Sprint"? For example, this is what I see in my instance:

Screen Shot 2022-09-02 at 2.02.34 PM.png

If somebody added a second custom field named sprint and defined it as a Text field it might look like this.

Screen Shot 2022-09-02 at 2.05.56 PM.png

You can rename custom fields that you have manually added to your system by clicking the ... to the far right

Screen Shot 2022-09-02 at 2.07.06 PM.png

... and selecting Edit Details.

Screen Shot 2022-09-02 at 2.07.20 PM.png

The built-in Sprint field is a special custom field added by the Jira Software product. If you had only the Jira Core/Work Management project you would not see that built-in Sprint field. Jira will not allow you to change the name of that field.

The actual data stored in the field is a list of 0..n numbers. Sprints have a "name", but that is not required to be unique, so they also have a system-wide unique numeric ID. It is the ID numbers that actually gets stored in the field.

The "=" operator does not work for a text field, but it does work for a list field because the list field is storing the unique IDs of the list items rather than the text of the list items.

Dave Edwards September 7, 2022

Here's what my Custom Fields screen shows: 

Screen Shot 2022-09-07 at 2.09.18 PM.png

If I understand correctly, you confirmed my suspicion that the "built-in" Sprint field is actually a custom field (probably cf[10003] in my case).  Presumably that would be what's showing up in the Custom Fields screen, and I don't see a second one.  That's what's confusing me.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2022

Hello Dave,

In a previous response you said:

"By experimenting, I found the custom field (cf[10003]) works with the '=' operator and the (apparently) standard field (Sprint (short text)) does not."

How did you find the "Sprint (short text)" field originally? Were you typing "sprint" into the Advanced Issue Search JQL field?

 

A possible explanation for not seeing "Sprint (short text)" in the Custom Fields screen would be if it is a Custom Field that was added to a Team Managed project. Custom Fields added to Team Managed projects don't show up in the Custom Fields screen because custom fields for Team Managed projects can't be shared with other projects.

In that case it would be necessary to look through the Team Managed projects to try to find the one where that field was created and is in use, and rename it there.

 

Regarding the custom field ID you are seeing, you can confirm if that is the ID for the "Sprint [LOCKED]" field in the Custom Fields scree. In the Custom Fields screen for the row where you see "Sprint LOCKED" if you click the ... button to the far right and then hover over one of the options revealed there, then in the preview of that option's URL you will see the ID number associated with that custom field and you can confirm if 10003 is the number associated with that field.

Screen Shot 2022-09-07 at 2.33.34 PM.png

Dave Edwards September 7, 2022

I found the names of the two sprint fields in auto-complete while typing JQL into the advanced filter box.

Screen Shot 2022-09-07 at 3.11.46 PM.png

Your recent response sounded really promising.  But to add to the confusion, the one Sprint field I can see under custom fields has an ID of 10750, not 10003.  And I checked all the team-managed projects, and the few that use Sprint are using the built-in one (it says "Jira created this field, you can't edit its name" when I hover over it).

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2022

The custom field IDs can vary - Jira allocates the numbers for all sorts of things as it needs them.  So you can get very different ones depending on what the history of your system is.  

Imagine my first Jira system - it was installed before we had Greenhopper, let alone Agile or Jira Software.  When the people who inherited it from me installed the Agile application, it created the new Sprint field with a number higher than all the other custom fields we had created over the years.  It gave them something like your 10750.

The last Jira Software I fired up got 10003 as the sprint field's id, because it was completely new, and 10003 is the next free number in a new system.

TLDR: the numbers are not that important.  The bit that matters is the howling bug in Jira that lets you create fields with duplicate names.  The best fix for your problem is to rename the non-system Sprint field to something else so you can identify it as not actually being the sprint.  A simple change will do - change the name to "sprint" or "sprint." to make it distinct, and then go talk to the people using it about how you can get rid of it and get everyone to use the system Sprint field as intended.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2022

Another place you may find a custom field named Sprint is in the Custom Fields Trash. However, when that is the only place that I have an extra sprint field, it does not come up in the JQL field in Advanced Search.

Screen Shot 2022-09-07 at 4.26.01 PM.png

 

I'm a bit stumped now about where else to look for that short text Sprint field. When looking at the Team Managed projects, did you look at all the issue types and also look in the Previously Created Fields section? If the custom field was created in a Team Managed project but is not currently associated with any issues it will still show up in the autocomplete in the Search screen.

Dave Edwards September 19, 2022

Scratch the bit about the custom field having an ID of 10750...I was on the wrong field.  It's actually 10003 which matches what I see in the autocomplete in the Advanced Search.

But for the life of me, I can't find the "other" (short text) sprint field.  I looked in trash and archived projects (there aren't any), in the custom fields trash (none), and in all the team-managed projects, including Previously Created Fields.  There are two team-managed projects that use Sprint and they both are the standard built-in one.  I can't delete or rename a field I can't find.

Is there a way in the team-managed projects that I can find the ID of the fields it's using, just to make sure?  I couldn't find any.  See this screenshot to see what I'm using to verify it's the standard sprint field:

Screen Shot 2022-09-19 at 3.54.32 PM.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 19, 2022

I got the custom field ID for the Sprint[short text] field when I tried to use it in and ORDER BY clause. In my case I had already named the field "Sprint1" when I created it.

Screen Shot 2022-09-19 at 4.12.38 PM.png

The last idea I have to try to figure out where that Sprint[short text] field is coming from is to do a search for all issues, order the output by that field, and include the field in the output columns for List view. If the field has a value set anywhere (in any issue you have permissions to see) then you should see it in the output. That will tell you if it was used in a Team project or a Company project.

If it is a Company project then it must be defined in the Jira Administration > Issues > Custom Fields list. In that case you could use the URL for editing a custom field to access it by plugging in the field ID

https://<mysite>.atlassian.net/secure/admin/EditCustomField!default.jspa?id=10066

If it is in a Team Managed project, hopefully the value will be set for at least one issue and that will help you identify the Team project containing the field.

Dave Edwards September 23, 2022

OK, thanks for your suggestion...I was able to formulate a query that exposed the offender.  It's a project of type "Product Discovery".  When I go into "Change settings" it asks me to accept Early Access terms, and I see it's a beta product.  So a big part of the mystery is solved.

The documentation that I found shows a way to delete a field but the option doesn't show up for me.  Further investigation confirms I don't have project administration permissions for this project.  I'll explore that avenue.

I'll consider this issue resolved based on this.  Thanks so much for the help.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2022

Hi @Dave Edwards 

FYI that Jira Product Discovery projects are essentially fancy team-managed projects with better filtering and visualizations.  A target usage is often portfolio management.  The product is in beta and it is unclear when it switches to a paid-product from Atlassian.

The admin of that project may have added the field to support something in their reporting, so check with them to collaborate on changes to the field.  And...as this tool is based around team-managed projects, that may also be related to why it has problems with dashboard gadgets.

Kind regards,
Bill

Dave Edwards September 26, 2022

Bill,

Thanks for the additional info on Product Discovery.  The fact that it acts like a team-managed project but isn't listed as one is why it took me so long to figure out where the offending duplicate custom field was.  That along with being a beta product, or maybe just a quirky product, the administration for fields, etc. looks different.  Anyway, just to close this out I was able to work with the administrator for that project, find the duplicate custom field, changed the name, and everything is working fine now.

Thanks to everyone who helped!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events