FogBugz Technical Support

A forum for technical support discussion related to Fogbugz.
The current FogBugz Knowledge Base can be found at http://help.fogcreek.com/fogbugz.

Posts by Fog Creek Employees are marked:

Documentation
Release Notes
Network Status

Public case - Auto email

I may be missing this, but I can't seem to get an automated email to be sent to a user that submits a public case via a form.  I'm an on-demand user.
Jim Jones Send private email
Monday, December 10, 2007
 
 
That's weird.  I just entered a public case with my On Demand account (the "Enter a New Case" link on the logon page) and received an email saying that "Your inquiry has been received and can be tracked at the following URL:"

I think that happens automatically when an email address is entered in the Email field of the public submission form - I'm pretty sure you don't have to configure anything to make that happen. 

I'm not quite sure what might be going wrong in your case - can you double check the address you are using when entering the public case?
Eric Nehrlich Send private email
Tuesday, December 11, 2007
 
 
I'm sorry - I should have specified that I'm also using the API.  I've created a public page with the appropriate form fields and I'm posting to another page on my server that interacts with the API.  Everything is working fine - the case is created, the correct fields are populated in my site's db.

The only thing that is not working is the auto-generated email is not being sent out to the user that supplies a valid email address. 

When I access the public case submission page directly from my on-demand site (pg=pgPublicEdit) and submit a case - I do get the auto email indicating the case has been submitted.  But, this page posts to (default.asp?pre=preSubmitBug) and isn't using the API. 

Any thoughts as to what is going on when using the API?

Thanks.
Jim Jones Send private email
Tuesday, December 11, 2007
 
 
Ah, that makes more sense.  FogBugz only sends the automatic email from that particular page - it's part of the code in the pgPublicEdit function.  Using the API will not generate that email automatically.

You can use the API to generate an email - use the cmd=email or cmd=reply function.
Eric Nehrlich Send private email
Tuesday, December 11, 2007
 
 
Eric - thanks.  I got things working using cmd=reply

So, I'm able to generate an email manually via the API.  One last question.  I can't figure out how to set the body of the email that I send.  I'm setting sSubject, sFrom, sTo but I don't see any param for Body - at the bottom of the API 3 docs there are some sample HTTP payloads that make reference to sBodyText - I tried that but nothing comes through in the email. 

Thanks.
Jim Jones Send private email
Tuesday, December 11, 2007
 
 
You need to add a sEvent="your body text" to the API call - sEvent is the "text description of the bugevent", and in this case, the bugevent is the email you're sending.  I just tried that on my local system and got an email with the text I used, so I think that will do what you want.
Eric Nehrlich Send private email
Wednesday, December 12, 2007
 
 
ok - got it.  that works, I'm able to send text in the email body.  but I'm trying to replicate the standard Fogbugz auto email that allows the user to track the status of the request - which automatically adds the case url like this:

https://mysite.fogbugz.com/default.asp?71_3ffg

is there a way to access the "71_3ffg" part so that I can include it in the email message that I generate via the API, upon public case submission.  I have everything working except the case url. 

I tried using {ticketurl} (which works when adding a snippet to an email manually) but the replace did not happen in the generated email.   

Any thoughts? 

Thanks.
Jim Jones Send private email
Wednesday, December 12, 2007
 
 
I think you can pull that value by doing a search on the case number and asking for cols=sTicket which will return the modified case number with the trailing authentication code.

That sTicket only gets generated once sCustomerEmail has been set, so I think you have to create the case first with the sCustomerEmail, then ask for the sTicket, then construct the reply.  I think.
Eric Nehrlich Send private email
Wednesday, December 12, 2007
 
 
I tried 2 things to try and retrieve the sTicket value and neither worked:

1) With the "cmd=new" request I added the param cols=sTicket and received this response (notice the empty sTicket element)
   
  <?xml version="1.0" encoding="UTF-8" ?>
- <response>
- <case ixBug="85" operations="edit,assign,resolve,reply,forward,remind">
  <sTicket />
  </case>
  </response>
 
2)  After the "cmd=new" request, I parsed the ixBug attribute and did a "cmd=search" with a q=86 (which is the ixBug value, from the previous cmd=new) and received this response (once again an empty sTicket)
 
  <?xml version="1.0" encoding="UTF-8" ?>
- <response>
- <cases count="1">
- <case ixBug="86" operations="edit,assign,resolve,reply,forward,remind">
  <sTicket />
  </case>
  </cases>
  </response> 


Also, I made sure to enter a valid email address with each request filling sCustomerEmail when I made the cmd=new requests. 
 
Any other thoughts?  Thanks.
Jim Jones Send private email
Wednesday, December 12, 2007
 
 
I have a bug open to fix this, but right now it will actually require the user to email you back before that ticket gets populated.
Michael H. Pryor Send private email
Thursday, December 13, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz Bug Tracking and Evidence-Based Scheduling.