4

1

General Question

What is the search axis name for a given Custom Field name added with the Custom Fields plugin?

My Issue

Fogbugz Version 7.0.30 (DB 713, Build 929) hosted in-house.

We've recently added a single custom field, a dropdown, and it doesn't seem to be searchable. From the documentation I see that you are suppose to be able to use the name of the field to search by, but it doesn't work.

The field name is "CCT Status" and the name I'm trying to search by is "cctxstatus". I got this from a thread about searching custom fields, I've also tried renaming the field itself to just cct, with no luck in searching.

I enter this in the search box cctxstatus:"Approved" but nothing comes back. I know there are cases with the statuses I'm searching for.

I even tried adding a new field, a number field, like the severity example and it also isn't searchable.

I did not perform the upgrade, so is there something I am missing? Some index or something?

flag

3 Answers

4

Solution for me

Resetting the search was the answer, Ken suggested it in a comment above. I put it here for more visibility.

Admin->Site->Search->Reset

General custom fields search

The sSimpleName of a field added by a plugin via the BugField library (including Custom Fields) is the name of the axis. For Custom Fields, this is the name of the field, all lowercase, with any non-letter characters replaced by "x" (including spaces!). Examples:

"Fixed In"       search for ->  fixedxin:"foobar"
"My field 123*"  search for ->  myxfieldxxxxx:"something"
"Color 1"        search for ->  colorxx:"blue"

Note this can lead to some search axis name collisions, and the Custom Fields plugin even allows fields with the same name.

Caveat

In the current version of FogBugz (8.8), searching for a person-type field does not work. Searches will result in all cases. e.g. developer:"Adam Wishneusky" shows cases with any value for my custom field, "Developer". This will be fixed in an upcoming version (case FC2111834). As a workaround, use the filter option for your field instead of searching.

link|flag
1

Any chance the search index needs to be redone by Lucene after adding a new custom field, Michael? We've got a similar situation as Jesse where we have a "Fixed In" custom (text) field. Searching using fixedin:x where we know there are entries that include "x" doesn't return any results...

Update: I looked at the SQL Server table that contains the information for this custom field. In the table, the sSimpleName field is set to fixedxin. If I then search using the fixedxin:text format, I can find what I'm looking for.

In the same table, sName is set to Fixed In. If I put quotes around the label and search like this, "Fixed In:" text, that works too.

link|flag
Hmm well I tried using the quotes "CCT Status:" Installed, but that doesn't work either. What is Lucene? Any other ideas? – Jesse Oct 28 2009 at 14:09
The FogBugz search engine is based on Apache's Lucene.Net, incubator.apache.org/lucene.net If you have access to your FogBugz database, you could take a look at the tables that are storing the CCT Status and see what values are in the sName and sSimpleName fields. My guess is those values will help you construct your search. – Ken Morse Oct 28 2009 at 14:32
Yeah, I've looked in the tables that store the data and the sName is "CCT Status" and the sSimpleName is "cctxstatus" (minus quotes) I'm at a loss as to why neither will search properly. – Jesse Oct 28 2009 at 20:46
1 
The only other thing I can think of is to try resetting the Searcher (Admin->Site->Search->Reset). BTW, is the CCT Status field a text field? – Ken Morse Oct 29 2009 at 22:17
I've reset the search, we will see if that fixes it. The field is a Dropdown field, and text values. – Jesse Oct 30 2009 at 14:15
0

You shouldn't need an "x" in the field name. If the field is called CCT Status, I would search using the axis CCTStatus (remove the space, don't replace it with an x).

Apparently I'm wrong about the x thing as you both have pointed out.

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.