Extending RequestTracker tickets with external data

326 Views Asked by At

I'm thinking about how to extend RT (and also with the IR extension, but I don't think this makes a difference) in regards to retrieving files from external sources (e.g. sftp) and adding them as attachments to tickets. I'm asking for suggestions of how I might go about this, as I've not used RT much and never programmed in Perl before.

I'm thinking of adding an input and button in the ticket to allow the user to provide a unique ID for the file and for them to be able to click when they want to retrieve the file from the external source, so not an automatic retrieval, unless it only does it once.

I'm thinking of creating a MakeClicky (http://requesttracker.wikia.com/wiki/MakeClicky) which creates a link to a cgi script (something like 'getfile(abc.txt)'), providing the ticket ID and the UID for the file. This script would then retrieve the file and post it as a comment/reply to the ticket. A couple of things to ask:

  • Are comments and replies to tickets really the only way to add an attachment? I read this somewhere but cant find the source now

  • How would I modify the existing ticket from a cgi script? Its on the same host, would I still need to use the REST api? Or can I just import the RT modules and add a attachment/comment/reply with the attachment without using the REST api?

The other option would be to create a scrip for on create/comment/reply that would search the contents of the ticket for an identifier for the file, retrieve the file and attach it.

I'm open to suggestions, unless one of these is a good way to do it!

TIA!

0

There are 0 best solutions below