Quotation marks in JQL disappears when saving a filter

Christian Axén December 14, 2017

I want to save a JQL filter that looks like this before saving:

JQL_before_saving.pngAfter saving the JQL looks like this:

JQL_after_saving.pngAfter saving the filter all the quotations marks disappear except the ones surrounding the first custom fields.

I've tried with different custom fields and the problem seems to be with the custom fields the quotations marks disappears from. The quotation marks disappear when I save the filter for each of those custom fields individually in different filters. I have no problems with other custom fields.

The fields are custom fields of the number type and I'm on Cloud.

Someone have any ideas of why this might happen?

2 answers

1 accepted

0 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 20, 2017

After some extensive troubleshooting on this issue, my colleague Fares, found that at least these two custom fields appear to have some other character other than the space created by a space bar in the custom field names.

The solution here was to edit the custom field name, remove this unknown whitespace character and replace it with a single spacebar press.   Once this was done, it appears to resolve this particular problem.

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 14, 2017

Hi @Christian Axén

Could you please elaborate on the problem here?  Is it that the JQL filter does not search because something is removing these quotes around these custom fields?    Or is this simply a cosmetic concern and the query still runs correctly?

Have you tried to use a single quote ' to see if it makes any difference here?

I have seen Jira auto change some simple syntax in JQL queries before, but typically when I see this there is no functional difference when it removes quotes like this.   Typically I only see Jira keep the quotes when there exists a space in the custom field name.

 

Another possible work-around might be to see if you can refer to the custom field by its id number. You could follow the steps in How to find id for custom field(s)?.

This way your JQL would look something like this:

cf[12000] > 401 OR cf[12000] < 399 OR cf[13100] >279.05 OR cf[13100] < 279.25

This is obviously less helpful in a sense because most people won't know what custom field that is, but it might help here as a temporary work-around.

But regardless, I am interested to investigate this further.  Could you let me know what specific character is that is being used in the first character of the first custom field?   Also the + or - character seems unusual to me.  I am interested to learn if this is a unicode or UTF8 character or not.   If it is, I would be interested to learn the unicode number associated with this character so that I can try to reproduce this problem.

Cheers,

Andy

Christian Axén December 14, 2017

Is it that the JQL filter does not search because something is removing these quotes around these custom fields? Or is this simply a cosmetic concern and the query still runs correctly?

The indicator on the left side of the JQL search field is green before saving, after saving the filter it is red and does not return any results. The query does not work.

Have you tried to use a single quote ' to see if it makes any difference here?

Single quotes does not work either, they disappear when saving the filter but they remain around the first cf. Same behaviour as with ".

I have seen Jira auto change some simple syntax in JQL queries before, but typically when I see this there is no functional difference when it removes quotes like this.   Typically I only see Jira keep the quotes when there exists a space in the custom field name.

There are spaces in each custom field so quotation marks are needed.

But regardless, I am interested to investigate this further.  Could you let me know what specific character is that is being used in the first character of the first custom field?

https://en.wikipedia.org/wiki/%C3%98

Also the + or - character seems unusual to me.  I am interested to learn if this is a unicode or UTF8 character or not.   If it is, I would be interested to learn the unicode number associated with this character so that I can try to reproduce this problem.

https://en.wikipedia.org/wiki/Plus-minus_sign

Please let me know if you need more information.

Oh, one thing I noticed yesterday is that that using this JQL in a rule in JSD works as intended. I used

filter = filterid

in the JSD rule but as the I could not get the filter to work I used the complete JQL in the rule instead without problems. 

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 15, 2017

Hi Christian,

I am not able to reproduce this same problem on my Jira Cloud instance.   I created three different number custom fields that used both the "Ø" character and the "±" along with other characters and a space.  But in my testing of this, I was not able to reproduce the problem in the issue navigator itself, nor when saving a filter with that content.

I am curious to see if you can please let me know the URL of your Cloud site?   I would like to investigate there to see if perhaps there is something about your Cloud environment that might cause this behavior.

Andy

Christian Axén December 15, 2017

I'm not comfortable posting it here, can I e-mail it to you @Andy Heinzer?

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 18, 2017

I just sent an email to your address in your community user profile to request that information.  Please let me know.

Andy

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 18, 2017

Hi Christian,

I am afraid I don't know what might be causing this problem just yet.   I was able to produce this same problem, but only on your Cloud instance and only with those two specific custom field names, and not with any other custom field names I tried.  Also since I tried to recreate those same field names/type in my own cloud instance I could not reproduce this problem there.  So I am concerned there is something unexpected happening in your instance that might be causing this to happen. 

I created a support request for this issue that you can view over on https://getsupport.atlassian.com/servicedesk/customer/portal/23/JST-353415

I am expecting that our Cloud support team can help us dig deeper here to understand what might be causing this and how to move forward here.   And once we have a solution there, I would like to post the solution here, provided there are no personal details in the process.

Andy

Christian Axén December 18, 2017

Thanks @Andy Heinzer, very kind of you and it is much appreciated.

Suggest an answer

Log in or Sign up to answer