Check-in [5edfe089ca]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1 Hash:5edfe089caa0c85e14abcff60b13b031bd914a5f
Date: 2010-02-18 13:47:55
User: ron
Edited Comment:Fixed layout of the custom_tickets.wiki page.
Original Comment:no comment
Tags And Properties
Changes

Changes to www/custom_ticket.wiki

1 <nowiki> | 1 <nowiki> 2 <h1 align="center">Customizing The Ticket System</h1> 2 <h1 align="center">Customizing The Ticket System</h1> 3 <p> 3 <p> 4 This guide will explain how to add the "assigned_to" and "submitted_by" fields 4 This guide will explain how to add the "assigned_to" and "submitted_by" fields 5 to the ticket system in Fossil, as well as making the system more useful. You 5 to the ticket system in Fossil, as well as making the system more useful. You 6 must have "admin" access to the repository to implement these instructions. 6 must have "admin" access to the repository to implement these instructions. 7 </p> 7 </p> 8 8 9 <h2>First modify the TICKET table</h2><blockquote> 9 <h2>First modify the TICKET table</h2><blockquote> 10 <p> 10 <p> 11 Click on the "Admin" menu, then "Tickets", then "Table". After the other fields 11 Click on the "Admin" menu, then "Tickets", then "Table". After the other fields 12 and before the final ")", insert: 12 and before the final ")", insert: 13 <pre> 13 <pre> 14 , | 14 , 15 assigned_to TEXT, 15 assigned_to TEXT, 16 opened_by TEXT 16 opened_by TEXT 17 </pre> 17 </pre> 18 And "Apply Changes". You have just added two more fields to the ticket 18 And "Apply Changes". You have just added two more fields to the ticket 19 database! NOTE: I won't tell you to "Apply Changes" after each step from here 19 database! NOTE: I won't tell you to "Apply Changes" after each step from here 20 on out. Now, how do you use these fields? 20 on out. Now, how do you use these fields? 21 </p> 21 </p> ................................................................................................................................................................................ 23 23 24 <h2>Next add assignees</h2><blockquote> 24 <h2>Next add assignees</h2><blockquote> 25 <p> 25 <p> 26 Back to the "Tickets" admin page, and click "Common". Add something like this: 26 Back to the "Tickets" admin page, and click "Common". Add something like this: 27 <pre> 27 <pre> 28 set assigned_choices { 28 set assigned_choices { 29 tom 29 tom 30 dick | 30 dick 31 harriet | 31 harriet 32 } 32 } 33 </pre> 33 </pre> 34 Obviously, choose names corresponding to the logins on your system. 34 Obviously, choose names corresponding to the logins on your system. 35 </p> 35 </p> 36 </blockquote> 36 </blockquote> 37 37 38 <h2>Now modify the 'new ticket' page</h2><blockquote> 38 <h2>Now modify the 'new ticket' page</h2><blockquote> ................................................................................................................................................................................ 46 submit_ticket 46 submit_ticket 47 } 47 } 48 </pre> 48 </pre> 49 Note the "set opened_by" bit -- that will automatically set the "opened_by" 49 Note the "set opened_by" bit -- that will automatically set the "opened_by" 50 field to the login name of the bug reporter. Now, skip to the part with "EMail" 50 field to the login name of the bug reporter. Now, skip to the part with "EMail" 51 and modify it like so: 51 and modify it like so: 52 <pre> 52 <pre> 53 <th1>enable_output [expr { "$login" eq "anonymous"}]</th1> | 53 &lt;th1>enable_output [expr { "$login" eq "anonymous"}]&lt;/th1> 54 <tr> | 54 &lt;tr> 55 <td align="right">EMail: | 55 &lt;td align="right">EMail: 56 <input type="text" name="private_contact" value="$<private_contact>" size="30"> | 56 &lt;input type="text" name="private_contact" value="$&lt;private_contact>" size= 57 </td> | 57 &lt;/td> 58 <td><u>Not publicly visible</u>. Used by developers to contact you with | 58 &lt;td>&lt;u>Not publicly visible&lt;/u>. Used by developers to contact you with 59 questions.</td> | 59 questions.&lt;/td> 60 </tr> | 60 &lt;/tr> 61 <th1>enable_output 1</th1> | 61 &lt;th1>enable_output 1&lt;/th1> 62 </pre> 62 </pre> 63 This bit of code will get rid of the "email" field entry for logged-in users. 63 This bit of code will get rid of the "email" field entry for logged-in users. 64 Since we know the user's information, we don't have to ask for it. NOTE: it 64 Since we know the user's information, we don't have to ask for it. NOTE: it 65 might be good to automatically scoop up the user's email and put it here. 65 might be good to automatically scoop up the user's email and put it here. 66 </p> 66 </p> 67 </blockquote> 67 </blockquote> 68 68 69 <h2>Modify the 'view ticket' page</h2><blockquote> 69 <h2>Modify the 'view ticket' page</h2><blockquote> 70 <p> 70 <p> 71 Look for the text "Contact:" (about halfway through). Then insert these lines 71 Look for the text "Contact:" (about halfway through). Then insert these lines 72 after the closing tr tag and before the "enable_output" line: 72 after the closing tr tag and before the "enable_output" line: 73 <pre> 73 <pre> 74 <tr> 74 <tr> 75 <td align="right">Assigned to:</td><td bgcolor="#d0d0d0"> | 75 &lt;td align="right">Assigned to:&lt;/td>&lt;td bgcolor="#d0d0d0"> 76 $<assigned_to> | 76 $&lt;assigned_to> 77 </td> | 77 &lt;/td> 78 <td align="right">Opened by:</td><td bgcolor="#d0d0d0"> | 78 &lt;td align="right">Opened by:&lt;/td>&lt;td bgcolor="#d0d0d0"> 79 $<opened_by> | 79 $&lt;opened_by> 80 </td> | 80 &lt;/td> 81 </pre> 81 </pre> 82 This will add a row which displays these two fields, in the event the user has 82 This will add a row which displays these two fields, in the event the user has 83 "edit" capability. 83 "edit" capability. 84 </p> 84 </p> 85 </blockquote> 85 </blockquote> 86 86 87 <h2>Modify the 'edit ticket' page</h2><blockquote> 87 <h2>Modify the 'edit ticket' page</h2><blockquote> 88 <p> 88 <p> 89 Before the "Severity:" line, add this: 89 Before the "Severity:" line, add this: 90 <pre> 90 <pre> 91 <tr><td align="right">Assigned to:</td><td> | 91 &lt;tr>&lt;td align="right">Assigned to:&lt;/td>&lt;td> 92 <th1>combobox assigned_to $assigned_choices 1</th1> | 92 &lt;th1>combobox assigned_to $assigned_choices 1&lt;/th1> 93 </td></tr> | 93 &lt;/td>&lt;/tr> 94 </pre> 94 </pre> 95 That will give you a drop-down list of assignees. Now, similar to the previous 95 That will give you a drop-down list of assignees. Now, similar to the previous 96 section, look for "Contact:" and add this: 96 section, look for "Contact:" and add this: 97 <pre> 97 <pre> 98 <tr><td align="right">Reported by:</td><td> | 98 &lt;tr>&lt;td align="right">Reported by:&lt;/td>&lt;td> 99 <input type="text" name="opened_by" size="40" | 99 &lt;input type="text" name="opened_by" size="40" 100 value="$<opened_by>"> | 100 value="$&lt;opened_by>"> 101 </td></tr> | 101 &lt;/td>&lt;/tr> 102 </pre> 102 </pre> 103 </p> 103 </p> 104 </blockquote> 104 </blockquote> 105 105 106 <h2>What next?</h2><blockquote> 106 <h2>What next?</h2><blockquote> 107 <p> 107 <p> 108 Now you can add custom reports which select based on the person to whom the 108 Now you can add custom reports which select based on the person to whom the