Question

I have a .NET web app that utilizes the FogBugz API to write problem tickets to our FB server... it uses the new command and... among all the other attributes... uses the sCustomerEmail argument to send the user's e-mail with the ticket.

My question is this: Is there a way that I can get a list (via the API, of course) of all tickets assigned to this e-mail? We're wanting to write another page that is a report of what tickets are currently assigned to this e-mail. We don't want to have to create FB accounts for every user out there.

I maybe see hints in the API docs but nothing concrete.

Thanks for any suggestions

Was it helpful?

Solution

Yes, you need to send a custom search to the API, passing in the email address as the correspondent axis.

So, once you've got a logon token:

https://example.fogbugz.com/api.asp?cmd=logon&email=jdoe@example.com&password=SecretPwd

You can then do the search:

https://example.fogbugz.com/api.asp?cmd=search&q=correspondent:customer@client.com&cols=ixBug,correspondent,sTicket,sTitle,dtOpened&token=cc83o7ri9c49t4vfvm3bn252ljvp23

Here I passed in a "q" parameter to the search command to set the search axis as "correspondent:customer@client.com".

I also specified a number of columns I want to get back, such as the case number (ixBug), the correspondent's email address (I like to verify things like this), the ticket id the customer got as a response (sTicket, I wasn't sure whether this was what you wanted or the case number), the title (sTitle) and the date the case was opened (dtOpened).

Technically you don't need to ever ask for the ixBug column as it's always available as an attribute of each case element returned in the xml, but sometimes it's easier to have these things as an element.

There are lots of different search axis you can use, and many columns you can return.

Check out the search reference and the sample xml payloads at the botom of the API reference.

OTHER TIPS

Probably might be better asking this directly to FB support or on their forums...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top