comparison doc/customizing.txt @ 1503:94ec56691f07

fix to [SF#700272]
author Richard Jones <richard@users.sourceforge.net>
date Sun, 09 Mar 2003 23:03:06 +0000
parents fd806ad85621
children d20680d611a6
comparison
equal deleted inserted replaced
1502:4013ef6690e9 1503:94ec56691f07
1 =================== 1 ===================
2 Customising Roundup 2 Customising Roundup
3 =================== 3 ===================
4 4
5 :Version: $Revision: 1.76 $ 5 :Version: $Revision: 1.77 $
6 6
7 .. This document borrows from the ZopeBook section on ZPT. The original is at: 7 .. This document borrows from the ZopeBook section on ZPT. The original is at:
8 http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx 8 http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
9 9
10 .. contents:: 10 .. contents::
2184 ---------------------------------- 2184 ----------------------------------
2185 2185
2186 Sometimes tracker admins want to control the states that users may move issues 2186 Sometimes tracker admins want to control the states that users may move issues
2187 to. 2187 to.
2188 2188
2189 1. add a Multilink property to the status class:: 2189 1. make "status" a required variable. This is achieved by adding the
2190 following to the top of the form in the ``issue.item`` template::
2191
2192 <input type="hidden" name="@required" value="status">
2193
2194 this will force users to select a status.
2195
2196 2. add a Multilink property to the status class::
2190 2197
2191 stat = Class(db, "status", ... , transitions=Multilink('status'), ...) 2198 stat = Class(db, "status", ... , transitions=Multilink('status'), ...)
2192 2199
2193 and then edit the statuses already created either: 2200 and then edit the statuses already created either:
2194 2201
2195 a. through the web using the class list -> status class editor, or 2202 a. through the web using the class list -> status class editor, or
2196 b. using the roundup-admin "set" command. 2203 b. using the roundup-admin "set" command.
2197 2204
2198 2. add an auditor module ``checktransition.py`` in your tracker's 2205 3. add an auditor module ``checktransition.py`` in your tracker's
2199 ``detectors`` directory:: 2206 ``detectors`` directory::
2200 2207
2201 def checktransition(db, cl, nodeid, newvalues): 2208 def checktransition(db, cl, nodeid, newvalues):
2202 ''' Check that the desired transition is valid for the "status" 2209 ''' Check that the desired transition is valid for the "status"
2203 property. 2210 property.
2214 db.status.get(current, 'name'), db.status.get(new, 'name')) 2221 db.status.get(current, 'name'), db.status.get(new, 'name'))
2215 2222
2216 def init(db): 2223 def init(db):
2217 db.issue.audit('set', checktransition) 2224 db.issue.audit('set', checktransition)
2218 2225
2219 3. in the ``issue.item`` template, change the status editing bit from:: 2226 4. in the ``issue.item`` template, change the status editing bit from::
2220 2227
2221 <th nowrap>Status</th> 2228 <th nowrap>Status</th>
2222 <td tal:content="structure context/status/menu">status</td> 2229 <td tal:content="structure context/status/menu">status</td>
2223 2230
2224 to:: 2231 to::

Roundup Issue Tracker: http://roundup-tracker.org/