This is a topic in How are you using Basecamp?

Ticket System Solution

 
Avatar Tom M 2 posts

I’ve seen people requesting and setting up ticketing systems with basecamp. The few solutions I’ve seen though didn’t quite do the job and/or cost money.

Hopefully I can clean up what I’ve done and isolate the part that communicates to basecamp from the specific form I have for the ticket system I setup. ... That way it’ll be more generic and easier for people to use.

However in short here’s what I’ve done (and use your imagination, really this can be combined with any system out there).

1- Setup a catch all e-mail address and (with Qmail) set it to process incoming e-mails through a php script. You probably need root access for this … unless your host is kind enough to have a control panel that lets you direct mail to a php script.

2- Have a helpdesk form on a web site (this could be another system…like trac even). This form does whatever it does..in my case stores to the database and sends off an e-mail to people. Multiple people. It also emails the catch-all wildcard email…but before it does that, it calls the basecamp API and saves a new message with information from the form. Then e-mails out people with the from address being altered to include the message id from the response back. Now people who get e-mails also get an address to reply to that has the basecamp message id…(must like basecamp does things)

3- With the script that catches e-mails…On a reply, it reads an id number at the end of the email address in the to line… so an email was sent to, let’s say, helpdesk-23432434@domain.com where the number is the id of the basecamp message. The script regex’s to get the id… strips out nested quotes in the e-mail and does some other formatting (strip_tags(), etc.) and then calls the basecamp API again…but this time saves a comment (or reply) to the appropriate message.

This very cleanly (after some nice regex matching which was a nightmare for me in my case) leaves messages and comments in basecamp. It doesn’t matter if the message title is later changed…There’s some other ticket systems for basecamp that rely on the title and numbers within the title…This doesn’t. It also doesn’t require you (in my implementation) to log in anywhere through a web browser. All updates are done through e-mail. The only form being filled out is the initial ticket.

We can take this a step further with regex again and change categories … or status … etc. by sending off instructions in the e-mails … Perhaps leaving codes like {{priority:severe}} or {{status:closed}} in an e-mail would get picked up by the script ... removed from the comment, but based on the command, used to change things around with the basecamp API.

Things can get very very complex…or remain simple. This is a fairly sneaky approach that both integrates well with basecamp and makes it easy / intuitive to use.

So hopefully this gives people some ideas. Scripts that parse and do things with e-mails are very very very handy. You could also e-mail special addresses to post messages etc…

More here: http://www.concepthue.com/blog/2008/05/06/basecamp-ticket-system-working-with-basecamps-api/
More to come there.

Signup or login to post a reply.