Chapter 5. CGI scripts

Table of Contents
Listing issues
Form queries
Free queries
Submitting an issue
Editing an issue
Registering a new template


While the command-line tools and email gateway are acceptable, and do provide a great deal of power and utility, they are not particularly user-friendly, and do not provide the best forum for external users to contribute to your issue-tracking database. And since the purpose of most issue-tracking systems is to track issues submitted by customers, it behooves you to support an issue-tracking website. Yaktrack includes such tools in the form of a series of cgi scripts and HTML templates.

To create such a repository, simply copy the distribution files into a directory which has both execute priveleges and write priveleges; I have only tested the Yaktrack CGI gateway on systems running the cgiwrap CGI execution wrapper, so cannot verify installations on other configurations. You must also have a created repository somewhere in the installation, in a directory at or "above" the directory containing the Yaktrack Python files. Once this is done, you may edit the HTML templates in the cgi-templates directory to give your Yaktrack repository your own look and feel. Do not disturb any HTML tags containing the attribute "yaksubid" (and you should not really disturb the "<FORM>" tags either).

When a Yaktrack CGI script executes, it loads the appropriate HTML template from the cgi-templates directory and walks through it. When it encounters a tag with an attribute named "yaksubid", it modifies that tag based on desired contents; in other words, a "<SELECT>" tag might be modified to contain a list of available templates. It then presents this altered text to the user, who selects and inputs responses and submits the form to the appropriate CGI script for evaluation. This allows a fair amount of power to the CGI gateway while maintaining look-and-feel flexibility; users can list issues, query the repository either by a query string (as per the command-line tools) or a simple form, submit and edit issues, and even register new templates for use with the repository (although we caution you from actually allowing users to submit new templates; to remove this functionality, remove the option from the HTML template; for further security, comment out or remove the appropriate line in the file)

The default gateway looks something like the following; to start using the gateway, the user should select the appropriate template from the selection box on the left, choose an option from the radio buttons on the right, and click the "submit" button:

The Yaktrack CGI gateway form

The Yaktrack CGI gateway form