1

I am attempting to search my computer field using the search API, but I can't find what the appropriate mapping is. When doing a search from the webpage I use the following:

computer:"Initial Release"

Which, as I understand things means that I should be calling the API with something like:

api.php?cmd=search&q=computer:%22Initial%20Release%22%20

However this is not returning any search results, and it seems like "computer" is the wrong term to use in this case.

flag
I just sent you an email to see if this is working for you yet – adambox Jul 18 2010 at 15:29
Did you ever figure this out? I am building a search piece to an application and I have been having similar issues when using the API to search. – Mike Tangorre Jul 13 at 11:26

3 Answers

1

I've tried to recreate this in my development environment, but it appears to be working as expected (i.e. returning cases that have their computer field set to "initial request"). What version of FogBugz are you using? Are you running FogBugz on Windows? And what database backend are you using?

Also, note that recently created cases or existing cases that have recently had their computer field set will not be discoverable by searching on that field until after they have been indexed. It may be worth checking to see if the FogBugz Maintenance service is running as this process is responsible for updating search indexes.

link|flag
1

don't curse me for stating the obvious... sometimes it's easy to overlook the easiest answer. Your API call needs a token :)

link|flag
1 
I have the token :) Was just presenting the actual search code. Sory for the confusion. – Rowan Jan 29 2010 at 22:39
Well, I figured it was worth an upvote. :-) – Jon Hjelle Jan 30 2010 at 3:51
0

Two ideas come to mind for this. The first is that the colon should be percent-escaped as you did with the spaces and quotes. The percent-encoding for : is %3A.

Otherwise, my experiments with search suggests that all spaces are replaced with plus signs when you search via the web interface (try a search and looking at the resulting URL). Try replacing any spaces with + and see if that helps.

link|flag

Your Answer

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