d5e7891b07 2007-11-18 drh: /* d5e7891b07 2007-11-18 drh: ** Copyright (c) 2007 D. Richard Hipp d5e7891b07 2007-11-18 drh: ** d5e7891b07 2007-11-18 drh: ** This program is free software; you can redistribute it and/or d5e7891b07 2007-11-18 drh: ** modify it under the terms of the GNU General Public d5e7891b07 2007-11-18 drh: ** License version 2 as published by the Free Software Foundation. d5e7891b07 2007-11-18 drh: ** d5e7891b07 2007-11-18 drh: ** This program is distributed in the hope that it will be useful, d5e7891b07 2007-11-18 drh: ** but WITHOUT ANY WARRANTY; without even the implied warranty of d5e7891b07 2007-11-18 drh: ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU d5e7891b07 2007-11-18 drh: ** General Public License for more details. d5e7891b07 2007-11-18 drh: ** d5e7891b07 2007-11-18 drh: ** You should have received a copy of the GNU General Public d5e7891b07 2007-11-18 drh: ** License along with this library; if not, write to the d5e7891b07 2007-11-18 drh: ** Free Software Foundation, Inc., 59 Temple Place - Suite 330, d5e7891b07 2007-11-18 drh: ** Boston, MA 02111-1307, USA. d5e7891b07 2007-11-18 drh: ** d5e7891b07 2007-11-18 drh: ** Author contact information: d5e7891b07 2007-11-18 drh: ** drh@hwaci.com d5e7891b07 2007-11-18 drh: ** http://www.hwaci.com/drh/ d5e7891b07 2007-11-18 drh: ** d5e7891b07 2007-11-18 drh: ******************************************************************************* d5e7891b07 2007-11-18 drh: ** d5e7891b07 2007-11-18 drh: ** This file contains a string constant that is the default ticket d5e7891b07 2007-11-18 drh: ** configuration. d5e7891b07 2007-11-18 drh: */ d5e7891b07 2007-11-18 drh: #include "config.h" d5e7891b07 2007-11-18 drh: #include "tktconfig.h" d5e7891b07 2007-11-18 drh: d5e7891b07 2007-11-18 drh: /* d5e7891b07 2007-11-18 drh: ** This is a sample "ticket configuration" file for fossil. d5e7891b07 2007-11-18 drh: ** d5e7891b07 2007-11-18 drh: ** There is considerable flexibility in how tickets are defined d5e7891b07 2007-11-18 drh: ** in fossil. Each repository can define its own ticket setup d5e7891b07 2007-11-18 drh: ** differently. Each repository has an instance of a file, like d5e7891b07 2007-11-18 drh: ** this one that defines how that repository deals with tickets. d5e7891b07 2007-11-18 drh: ** ffe92f1a2f 2008-02-13 drh: ** This file is in the form of a script in TH1 - a minimalist ffe92f1a2f 2008-02-13 drh: ** TCL clone. d5e7891b07 2007-11-18 drh: */ d5e7891b07 2007-11-18 drh: 5f3ddcc1b8 2007-11-25 drh: /* @-comment: ** */ d5e7891b07 2007-11-18 drh: const char zDefaultTicketConfig[] = 5f3ddcc1b8 2007-11-25 drh: @ ############################################################################ 5f3ddcc1b8 2007-11-25 drh: @ # Every ticket configuration *must* define an SQL statement that creates 5f3ddcc1b8 2007-11-25 drh: @ # the TICKET table. This table must have three columns named 5f3ddcc1b8 2007-11-25 drh: @ # tkt_id, tkt_uuid, and tkt_mtime. tkt_id must be the integer primary 5f3ddcc1b8 2007-11-25 drh: @ # key and tkt_uuid and tkt_mtime must be unique. A configuration should 5f3ddcc1b8 2007-11-25 drh: @ # define addition columns as necessary. All columns should be in all 5f3ddcc1b8 2007-11-25 drh: @ # lower-case letters and should not begin with "tkt". d5e7891b07 2007-11-18 drh: @ # ffe92f1a2f 2008-02-13 drh: @ set ticket_sql { d5e7891b07 2007-11-18 drh: @ CREATE TABLE ticket( d5e7891b07 2007-11-18 drh: @ -- Do not change any column that begins with tkt_ d5e7891b07 2007-11-18 drh: @ tkt_id INTEGER PRIMARY KEY, fb358ca492 2007-11-24 drh: @ tkt_uuid TEXT, fb358ca492 2007-11-24 drh: @ tkt_mtime DATE, d5e7891b07 2007-11-18 drh: @ -- Add as many field as required below this line d5e7891b07 2007-11-18 drh: @ type TEXT, d5e7891b07 2007-11-18 drh: @ status TEXT, d5e7891b07 2007-11-18 drh: @ subsystem TEXT, d5e7891b07 2007-11-18 drh: @ priority TEXT, d5e7891b07 2007-11-18 drh: @ severity TEXT, fb358ca492 2007-11-24 drh: @ foundin TEXT, fb358ca492 2007-11-24 drh: @ contact TEXT, 3122fc4c7e 2008-02-14 drh: @ resolution TEXT, d5e7891b07 2007-11-18 drh: @ title TEXT, fb358ca492 2007-11-24 drh: @ comment TEXT, fb358ca492 2007-11-24 drh: @ -- Do not alter this UNIQUE clause: fb358ca492 2007-11-24 drh: @ UNIQUE(tkt_uuid, tkt_mtime) d5e7891b07 2007-11-18 drh: @ ); d5e7891b07 2007-11-18 drh: @ -- Add indices as desired ffe92f1a2f 2008-02-13 drh: @ } d5e7891b07 2007-11-18 drh: @ d5e7891b07 2007-11-18 drh: @ ############################################################################ d5e7891b07 2007-11-18 drh: @ # You can define additional variables here. These variables will be d5e7891b07 2007-11-18 drh: @ # accessible to the page templates when they run. d5e7891b07 2007-11-18 drh: @ # ffe92f1a2f 2008-02-13 drh: @ set type_choices { fb358ca492 2007-11-24 drh: @ Code_Defect fb358ca492 2007-11-24 drh: @ Build_Problem fb358ca492 2007-11-24 drh: @ Documentation fb358ca492 2007-11-24 drh: @ Feature_Request fb358ca492 2007-11-24 drh: @ Incident ffe92f1a2f 2008-02-13 drh: @ } ffe92f1a2f 2008-02-13 drh: @ set priority_choices {Immediate High Medium Low Zero} ffe92f1a2f 2008-02-13 drh: @ set severity_choices {Critical Severe Important Minor Cosmetic} ffe92f1a2f 2008-02-13 drh: @ set resolution_choices { d5e7891b07 2007-11-18 drh: @ Open d5e7891b07 2007-11-18 drh: @ Fixed d5e7891b07 2007-11-18 drh: @ Rejected d5e7891b07 2007-11-18 drh: @ Unable_To_Reproduce d5e7891b07 2007-11-18 drh: @ Works_As_Designed d5e7891b07 2007-11-18 drh: @ External_Bug d5e7891b07 2007-11-18 drh: @ Not_A_Bug d5e7891b07 2007-11-18 drh: @ Duplicate d5e7891b07 2007-11-18 drh: @ Overcome_By_Events d5e7891b07 2007-11-18 drh: @ Drive_By_Patch ffe92f1a2f 2008-02-13 drh: @ } ffe92f1a2f 2008-02-13 drh: @ set status_choices { d5e7891b07 2007-11-18 drh: @ Open d5e7891b07 2007-11-18 drh: @ Verified d5e7891b07 2007-11-18 drh: @ In_Process d5e7891b07 2007-11-18 drh: @ Deferred d5e7891b07 2007-11-18 drh: @ Fixed d5e7891b07 2007-11-18 drh: @ Tested d5e7891b07 2007-11-18 drh: @ Closed ffe92f1a2f 2008-02-13 drh: @ } ffe92f1a2f 2008-02-13 drh: @ set subsystem_choices {one two three} d5e7891b07 2007-11-18 drh: @ d5e7891b07 2007-11-18 drh: @ ########################################################################## d5e7891b07 2007-11-18 drh: @ # The "tktnew_template" variable is set to text which is a template for d5e7891b07 2007-11-18 drh: @ # the HTML of the "New Ticket" page. Within this template, text contained d5e7891b07 2007-11-18 drh: @ # within [...] is subscript. That subscript runs when the page is d5e7891b07 2007-11-18 drh: @ # rendered. d5e7891b07 2007-11-18 drh: @ # ffe92f1a2f 2008-02-13 drh: @ set tktnew_template { d5e7891b07 2007-11-18 drh: @ <!-- load database field names not found in CGI with an empty string --> d5e7891b07 2007-11-18 drh: @ <!-- start a form --> ffe92f1a2f 2008-02-13 drh: @ <th1> ffe92f1a2f 2008-02-13 drh: @ if {[info exists submit]} { ffe92f1a2f 2008-02-13 drh: @ set status Open ffe92f1a2f 2008-02-13 drh: @ submit_ticket ffe92f1a2f 2008-02-13 drh: @ } ffe92f1a2f 2008-02-13 drh: @ </th1> d5e7891b07 2007-11-18 drh: @ <table cellpadding="5"> d5e7891b07 2007-11-18 drh: @ <tr> fb358ca492 2007-11-24 drh: @ <td colspan="2"> d5e7891b07 2007-11-18 drh: @ Enter a one-line summary of the problem:<br> ffe92f1a2f 2008-02-13 drh: @ <input type="text" name="title" size="60" value="$<title>"> d5e7891b07 2007-11-18 drh: @ </td> d5e7891b07 2007-11-18 drh: @ </tr> d5e7891b07 2007-11-18 drh: @ d5e7891b07 2007-11-18 drh: @ <tr> d5e7891b07 2007-11-18 drh: @ <td align="right">Type: ffe92f1a2f 2008-02-13 drh: @ <th1>combobox type $type_choices 1</th1> d5e7891b07 2007-11-18 drh: @ </td> d5e7891b07 2007-11-18 drh: @ <td>What type of ticket is this?</td> d5e7891b07 2007-11-18 drh: @ </tr> d5e7891b07 2007-11-18 drh: @ d5e7891b07 2007-11-18 drh: @ <tr> d5e7891b07 2007-11-18 drh: @ <td align="right">Version: ffe92f1a2f 2008-02-13 drh: @ <input type="text" name="foundin" size="20" value="$<foundin>"> d5e7891b07 2007-11-18 drh: @ </td> d5e7891b07 2007-11-18 drh: @ <td>In what version or build number do you observer the problem?</td> d5e7891b07 2007-11-18 drh: @ </tr> d5e7891b07 2007-11-18 drh: @ d5e7891b07 2007-11-18 drh: @ <tr> d5e7891b07 2007-11-18 drh: @ <td align="right">Severity: 3122fc4c7e 2008-02-14 drh: @ <th1>combobox severity $severity_choices 1</th1> d5e7891b07 2007-11-18 drh: @ </td> d5e7891b07 2007-11-18 drh: @ <td>How debilitating is the problem? How badly does the problem d5e7891b07 2007-11-18 drh: @ effect the operation of the product?</td> fb358ca492 2007-11-24 drh: @ </tr> fb358ca492 2007-11-24 drh: @ fb358ca492 2007-11-24 drh: @ <tr> fb358ca492 2007-11-24 drh: @ <td align="right">EMail: ffe92f1a2f 2008-02-13 drh: @ <input type="text" name="contact" value="$<contact>" size="30"> fb358ca492 2007-11-24 drh: @ </td> fb358ca492 2007-11-24 drh: @ <td>Not publically visible. Used by developers to contact you with fb358ca492 2007-11-24 drh: @ questions.</td> d5e7891b07 2007-11-18 drh: @ </tr> d5e7891b07 2007-11-18 drh: @ d5e7891b07 2007-11-18 drh: @ <tr> d5e7891b07 2007-11-18 drh: @ <td colspan="2"> d5e7891b07 2007-11-18 drh: @ Enter a detailed description of the problem. d5e7891b07 2007-11-18 drh: @ For code defects, be sure to provide details on exactly how d5e7891b07 2007-11-18 drh: @ the problem can be reproduced. Provide as much detail as d5e7891b07 2007-11-18 drh: @ possible. d5e7891b07 2007-11-18 drh: @ <br> fde1d82372 2008-02-13 drh: @ <th1>set nline [linecount $comment 50 10]</th1> ffe92f1a2f 2008-02-13 drh: @ <textarea name="comment" cols="80" rows="$nline" ffe92f1a2f 2008-02-13 drh: @ wrap="virtual" class="wikiedit">$<comment></textarea><br> d5e7891b07 2007-11-18 drh: @ <input type="submit" name="preview" value="Preview"> d5e7891b07 2007-11-18 drh: @ </tr> d5e7891b07 2007-11-18 drh: @ ffe92f1a2f 2008-02-13 drh: @ <th1>enable_output [info exists preview]</th1> d5e7891b07 2007-11-18 drh: @ <tr><td colspan="2"> d5e7891b07 2007-11-18 drh: @ Description Preview:<br><hr> ffe92f1a2f 2008-02-13 drh: @ <th1>wiki $comment</th1> d5e7891b07 2007-11-18 drh: @ <hr> d5e7891b07 2007-11-18 drh: @ </td></tr> ffe92f1a2f 2008-02-13 drh: @ <th1>enable_output 1</th1> d5e7891b07 2007-11-18 drh: @ d5e7891b07 2007-11-18 drh: @ <tr> d5e7891b07 2007-11-18 drh: @ <td align="right"> d5e7891b07 2007-11-18 drh: @ <input type="submit" name="submit" value="Submit"> d5e7891b07 2007-11-18 drh: @ </td> d5e7891b07 2007-11-18 drh: @ <td>After filling in the information above, press this button to create d5e7891b07 2007-11-18 drh: @ the new ticket</td> d5e7891b07 2007-11-18 drh: @ </tr> d5e7891b07 2007-11-18 drh: @ </table> d5e7891b07 2007-11-18 drh: @ <!-- end of form --> ffe92f1a2f 2008-02-13 drh: @ } d5e7891b07 2007-11-18 drh: @ d5e7891b07 2007-11-18 drh: @ ########################################################################## d5e7891b07 2007-11-18 drh: @ # The template for the "edit ticket" page a5e4e1ba96 2007-11-24 drh: @ # a5e4e1ba96 2007-11-24 drh: @ # Then generated text is inserted inside a form which feeds back to itself. a5e4e1ba96 2007-11-24 drh: @ # All CGI parameters are loaded into variables. All database files are a5e4e1ba96 2007-11-24 drh: @ # loaded into variables if they have not previously been loaded by a5e4e1ba96 2007-11-24 drh: @ # CGI parameters. ffe92f1a2f 2008-02-13 drh: @ set tktedit_template { ffe92f1a2f 2008-02-13 drh: @ <th1> ffe92f1a2f 2008-02-13 drh: @ if {![info exists username]} {set username $login} ffe92f1a2f 2008-02-13 drh: @ if {[info exists submit]} { ffe92f1a2f 2008-02-13 drh: @ if {[info exists $cmappnd] && [string length $cmappnd]>0} { ffe92f1a2f 2008-02-13 drh: @ set ctxt "\n\n<hr><i>" ffe92f1a2f 2008-02-13 drh: @ if {$username==$login} { ffe92f1a2f 2008-02-13 drh: @ set usr "$ctxt[htmlize $login]" ffe92f1a2f 2008-02-13 drh: @ } else { ffe92f1a2f 2008-02-13 drh: @ set usr "[htmlize $login claimingn to be [htmlize $username]" ffe92f1a2f 2008-02-13 drh: @ } ffe92f1a2f 2008-02-13 drh: @ append_field comment \ ffe92f1a2f 2008-02-13 drh: @ "\n\n<hr><i>$usr added on [date]:</i><br>\n$comment" ffe92f1a2f 2008-02-13 drh: @ } a5e4e1ba96 2007-11-24 drh: @ submit_ticket ffe92f1a2f 2008-02-13 drh: @ } ffe92f1a2f 2008-02-13 drh: @ </th1> d5e7891b07 2007-11-18 drh: @ <table cellpadding="5"> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Title:</td><td> ffe92f1a2f 2008-02-13 drh: @ <input type="text" name="title" value="$<title>" size="60"> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Status:</td><td> ffe92f1a2f 2008-02-13 drh: @ <th1>combobox status $status_choices 1</th1> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Type:</td><td> ffe92f1a2f 2008-02-13 drh: @ <th1>combobox type $type_choices 1</th1> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Severity:</td><td> ffe92f1a2f 2008-02-13 drh: @ <th1>combobox severity $severity_choices 1</th1> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Priority:</td><td> ffe92f1a2f 2008-02-13 drh: @ <th1>combobox priority $priority_choices 1</th1> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Resolution:</td><td> ffe92f1a2f 2008-02-13 drh: @ <th1>combobox resolution $resolution_choices 1</th1> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Subsystem:</td><td> ffe92f1a2f 2008-02-13 drh: @ <th1>combobox subsystem $subsystem_choices 1</th1> ffe92f1a2f 2008-02-13 drh: @ </td></tr> ffe92f1a2f 2008-02-13 drh: @ <th1>enable_output [hascap e]</th1> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Contact:</td><td> ffe92f1a2f 2008-02-13 drh: @ <input type="text" name="contact" size="40" value="$<contact>"> d5e7891b07 2007-11-18 drh: @ </td></tr> ffe92f1a2f 2008-02-13 drh: @ <th1>enable_output 1</th1> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Version Found In:</td><td> ffe92f1a2f 2008-02-13 drh: @ <input type="text" name="foundin" size="50" value="$<foundin>"> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td colspan="2"> fde1d82372 2008-02-13 drh: @ <th1> fde1d82372 2008-02-13 drh: @ if {![info exists eall]} {set eall 0} fde1d82372 2008-02-13 drh: @ if {[info exists aonlybtn]} {set eall 0} fde1d82372 2008-02-13 drh: @ if {[info exists eallbtn]} {set eall 1} fde1d82372 2008-02-13 drh: @ if {![hascap w]} {set eall 0} 3122fc4c7e 2008-02-14 drh: @ if {![info exists cmappnd]} {set cmappnd {}} fde1d82372 2008-02-13 drh: @ set nline [linecount $comment 15 10] fde1d82372 2008-02-13 drh: @ enable_output $eall fde1d82372 2008-02-13 drh: @ </th1> d5e7891b07 2007-11-18 drh: @ Description And Comments:<br> fde1d82372 2008-02-13 drh: @ <textarea name="comment" cols="80" rows="$nline" fde1d82372 2008-02-13 drh: @ wrap="virtual" class="wikiedit">$<comment></textarea><br> d5e7891b07 2007-11-18 drh: @ <input type="hidden" name="eall" value="1"> d5e7891b07 2007-11-18 drh: @ <input type="submit" name="aonlybtn" value="Append Remark"> 3122fc4c7e 2008-02-14 drh: @ <th1>enable_output [expr {!$eall}]</th1> a5e4e1ba96 2007-11-24 drh: @ Append Remark from fde1d82372 2008-02-13 drh: @ <input type="text" name="username" value="$<username>" size="30">:<br> d5e7891b07 2007-11-18 drh: @ <textarea name="cmappnd" cols="80" rows="15" fde1d82372 2008-02-13 drh: @ wrap="virtual" class="wikiedit">$<cmappnd></textarea><br> fde1d82372 2008-02-13 drh: @ <th1>enable_output [expr {[hascap w] && !$eall}]</th1> d5e7891b07 2007-11-18 drh: @ <input type="submit" name="eallbtn" value="Edit All"> fde1d82372 2008-02-13 drh: @ <th1>enable_output 1</th1> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td align="right"></td><td> d5e7891b07 2007-11-18 drh: @ <input type="submit" name="submit" value="Submit Changes"> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ </table> fde1d82372 2008-02-13 drh: @ } d5e7891b07 2007-11-18 drh: @ d5e7891b07 2007-11-18 drh: @ ########################################################################## d5e7891b07 2007-11-18 drh: @ # The template for the "view ticket" page ffe92f1a2f 2008-02-13 drh: @ set tktview_template { d5e7891b07 2007-11-18 drh: @ <!-- load database fields automatically loaded into variables --> d5e7891b07 2007-11-18 drh: @ <table cellpadding="5"> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Title:</td><td> ffe92f1a2f 2008-02-13 drh: @ $<title> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Status:</td><td> ffe92f1a2f 2008-02-13 drh: @ $<status> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Type:</td><td> ffe92f1a2f 2008-02-13 drh: @ $<type> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Severity:</td><td> ffe92f1a2f 2008-02-13 drh: @ $<severity> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Priority:</td><td> ffe92f1a2f 2008-02-13 drh: @ $<priority> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Resolution:</td><td> ffe92f1a2f 2008-02-13 drh: @ $<resolution> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Subsystem:</td><td> ffe92f1a2f 2008-02-13 drh: @ $<subsystem> d5e7891b07 2007-11-18 drh: @ </td></tr> ffe92f1a2f 2008-02-13 drh: @ <th1>enable_output [hascap e]</th1> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Contact:</td><td> ffe92f1a2f 2008-02-13 drh: @ $<contact> d5e7891b07 2007-11-18 drh: @ </td></tr> ffe92f1a2f 2008-02-13 drh: @ <th1>enable_output 1</th1> d5e7891b07 2007-11-18 drh: @ <tr><td align="right">Version Found In:</td><td> ffe92f1a2f 2008-02-13 drh: @ $<foundin> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ <tr><td colspan="2"> d5e7891b07 2007-11-18 drh: @ Description And Comments:<br> ffe92f1a2f 2008-02-13 drh: @ <th1>wiki $comment</th1> d5e7891b07 2007-11-18 drh: @ </td></tr> d5e7891b07 2007-11-18 drh: @ </table> ffe92f1a2f 2008-02-13 drh: @ } d5e7891b07 2007-11-18 drh: ;