comparison doc/index.html @ 255:d4ef19ef17bd

Bug fix for test_init on Windows. More documenation!!
author Richard Jones <richard@users.sourceforge.net>
date Sat, 29 Sep 2001 23:48:06 +0000
parents af6e10660e27
children 0fb85acfa9e4
comparison
equal deleted inserted replaced
254:af6e10660e27 255:d4ef19ef17bd
28 <ul> 28 <ul>
29 <li><a href="#cmd">Command Line Tool</a> 29 <li><a href="#cmd">Command Line Tool</a>
30 <li><a href="#web">Web Interface</a> 30 <li><a href="#web">Web Interface</a>
31 <li><a href="#mail">E-Mail Gateway</a> 31 <li><a href="#mail">E-Mail Gateway</a>
32 </ul> 32 </ul>
33 <li><a href="#custom">Customising Roundup</a>
34 <ul>
35 <li><a href="#custinst">Instance Schema</a>
36 <li><a href="#custweb">Web Interface</a>
37 </ul>
33 <li><a href="spec.html">Roundup's Design Document</a> ("Implementation Guide") 38 <li><a href="spec.html">Roundup's Design Document</a> ("Implementation Guide")
34 <li><a href="#ack">Acknowledgements</a> 39 <li><a href="#ack">Acknowledgements</a>
35 </ul> 40 </ul>
36 41
37 <p><hr> 42 <p><hr>
81 ie. "./roundup-admin init". 86 ie. "./roundup-admin init".
82 87
83 88
84 <h3><a name="instance">The Instance</a></h3> 89 <h3><a name="instance">The Instance</a></h3>
85 90
86 We'll be referring to the term "instance" a lot from now on. An instance is 91 We'll be referring to the term <em>instance</em> a lot from now on. An
92 instance is
87 a directory in your filesystem that is where all the information about a 93 a directory in your filesystem that is where all the information about a
88 live issue tracker database is stored. The data that is entered as issues, 94 live issue tracker database is stored. The data that is entered as issues,
89 the users who access the database and the definition of the database itself 95 the users who access the database and the definition of the database itself
90 all reside there: 96 all reside there:
91 <ol> 97 <ol>
238 <li>Any e-mail sent to roundup with the subject line containing [issue] 244 <li>Any e-mail sent to roundup with the subject line containing [issue]
239 will automatically created a new issue in the database using the 245 will automatically created a new issue in the database using the
240 contents of the e-mail. 246 contents of the e-mail.
241 </ol> 247 </ol>
242 248
243 <p><br> 249 <p><hr>
244 <h2><a name="guide">User Guide</a></h2> 250 <h2><a name="guide">User Guide</a></h2>
245 <h3><a name="cmd">Command Line Tool</a></h3> 251 <h3><a name="cmd">Command Line Tool</a></h3>
246 252
247 Usage: 253 Usage:
248 <tt>roundup-admin [-i instance home] [-u login] [-c] &lt;command&gt; 254 <tt>roundup-admin [-i instance home] [-u login] [-c] &lt;command&gt;
249 &lt;arguments&gt;</tt> 255 &lt;arguments&gt;</tt>
250 <p> 256
251 <dl> 257 <p>
252 <dt>Commands: 258 <table><tr><th colspan=2>Options:</th></tr>
253 <dd>create classname property=value ... 259 <tr><td>-i instance home </td><td>specify the issue tracker "home directory" to administer
254 <dd>find classname propname=value ... 260 </td></tr>
255 <dd>freshen 261 <tr><td>-u </td><td>the user[:password] to use for commands
256 <dd>get property designator[,designator]* 262 </td></tr>
257 <dd>history designator 263 <tr><td>-c </td><td>when outputting lists of data, just comma-separate them
258 <dd>init [template [backend [admin password]]] 264 </td></tr>
259 <dd>list classname [property] 265 </table>
260 <dd>retire designator[,designator]* 266
261 <dd>set designator[,designator]* propname=value ... 267 <p>
262 <dd>spec classname 268 <table border=1 cellspacing=0>
263 <dt>Help: 269 <tr><th colspan=2>Command Help</th></tr>
264 <dd>roundup-admin -h 270 <tr><td valign=top><strong>history</strong></td>
265 <dd>roundup-admin help -- this help 271 <td><tt>history designator</tt><br>
266 <dd>roundup-admin help <command> -- command-specific help 272 Lists the journal entries for the node identified by the designator.
267 <dd>roundup-admin morehelp -- even more detailed help 273 </td></tr>
268 <dt>Options: 274
269 <dd>-i instance home -- specify the issue tracker "home directory" to administer 275 <tr><td valign=top><strong>find</strong></td>
270 <dd>-u -- the user[:password] to use for commands 276 <td><tt>find classname propname=value ...</tt><br>
271 <dd>-c -- when outputting lists of data, just comma-separate them 277 Find the nodes of the given class with a given property value. The
272 </dl> 278 value may be either the nodeid of the linked node, or its key value.
279 </td></tr>
280
281 <tr><td valign=top><strong>list</strong></td>
282 <td><tt>list classname [property]</tt><br>
283 Lists all instances of the given class along. If the property is not
284 specified, the "label" property is used. The label property is tried
285 in order: the key, "name", "title" and then the first property,
286 alphabetically.
287 </td></tr>
288
289 <tr><td valign=top><strong>retire</strong></td>
290 <td><tt>retire designator[,designator]*</tt><br>
291 This action indicates that a particular node is not to be retrieved by
292 the list or find commands, and its key value may be re-used.
293 </td></tr>
294
295 <tr><td valign=top><strong>create</strong></td>
296 <td><tt>create classname property=value ...</tt><br>
297 This creates a new entry of the given class using the property
298 name=value arguments provided on the command line after the "create"
299 command.
300 </td></tr>
301
302 <tr><td valign=top><strong>get</strong></td>
303 <td><tt>get property designator[,designator]*</tt><br>
304 Retrieves the property value of the nodes specified by the designators.
305 </td></tr>
306
307 <tr><td valign=top><strong>spec</strong></td>
308 <td><tt>spec classname</tt><br>
309 This lists the properties for a given class.
310 </td></tr>
311
312 <tr><td valign=top><strong>set</strong></td>
313 <td><tt>set designator[,designator]* propname=value ...</tt><br>
314 Sets the property to the value for all designators given.
315 </td></tr>
316
317 <tr><td valign=top><strong>init</strong></td>
318 <td><tt>init [template [backend [admin password]]]</tt><br>
319 The command will prompt for the instance home directory (if not supplied
320 through INSTANCE_HOME or the -i option. The template, backend and admin
321 password may be specified on the command-line as arguments, in that order.
322 </td></tr>
323
324 <tr><td valign=top><strong>freshen</strong></td>
325 <td><tt>freshen</tt><br>
326 <strong>**DO NOT USE**</strong>
327 <p>
328 This currently kills databases!!!!
329 <p>
330 This action should generally not be used. It reads in an instance
331 database and writes it again. In the future, is may also update
332 instance code to account for changes in templates. It's probably wise
333 not to use it anyway. Until we're sure it won't break things...
334 </td></tr>
335
336 <tr><td><strong>help</strong></td>
337 <td><tt>help [command]</tt><br>
338 Short help about roundup-admin or the specific command.
339 </td></tr>
340
341 <tr><td><strong>morehelp</strong></td>
342 <td><tt>morehelp</tt><br>
343 All available help from the roundup-admin tool.
344 </td></tr>
345 </table>
273 346
274 <p> 347 <p>
275 All commands (except help) require an instance specifier. This is just the path 348 All commands (except help) require an instance specifier. This is just the path
276 to the roundup instance you're working with. A roundup instance is where 349 to the roundup instance you're working with. A roundup instance is where
277 roundup keeps the database and configuration file that defines an issue 350 roundup keeps the database and configuration file that defines an issue
287 printed results: 360 printed results:
288 <ul> 361 <ul>
289 <li>Strings are, well, strings. 362 <li>Strings are, well, strings.
290 <li>Date values are printed in the full date format in the local time zone, and 363 <li>Date values are printed in the full date format in the local time zone, and
291 accepted in the full format or any of the partial formats explained below. 364 accepted in the full format or any of the partial formats explained below.
292 <li>Link values are printed as node designators. When given as an argument,
293 node designators and key strings are both accepted.
294 <li>Multilink values are printed as lists of node designators joined by commas.
295 When given as an argument, node designators and key strings are both
296 accepted; an empty string, a single node, or a list of nodes joined by
297 commas is accepted.
298 </ul>
299 When multiple nodes are specified to the roundup get or roundup set
300 commands, the specified properties are retrieved or set on all the listed
301 nodes.
302 <p>
303 When multiple results are returned by the roundup get or roundup find
304 commands, they are printed one per line (default) or joined by commas (with
305 the -c) option.
306 <p>
307 Where the command changes data, a login name/password is required. The
308 login may be specified as either "name" or "name:password".
309 <ul>
310 <li>ROUNDUP_LOGIN environment variable
311 <li>the -u command-line option
312 </ul>
313 If either the name or password is not supplied, they are obtained from the
314 command-line.
315 <p>
316 Date format examples:
317 <table> 365 <table>
318 <tr><th>Input of...</th><th>Means...</th></tr> 366 <tr><th>Input of...</th><th>Means...</th></tr>
319 <tr><td>"2000-04-17.03:45"</td><td>2000-04-17.08:45:00</td></tr> 367 <tr><td>"2000-04-17.03:45"</td><td>2000-04-17.08:45:00</td></tr>
320 <tr><td>"2000-04-17"</td><td>2000-04-17.00:00:00</td></tr> 368 <tr><td>"2000-04-17"</td><td>2000-04-17.00:00:00</td></tr>
321 <tr><td>"01-25"</td><td>yyyy-01-25.00:00:00</td></tr> 369 <tr><td>"01-25"</td><td>yyyy-01-25.00:00:00</td></tr>
323 <tr><td>"11-07.09:32:43"</td><td>yyyy-11-07.14:32:43</td></tr> 371 <tr><td>"11-07.09:32:43"</td><td>yyyy-11-07.14:32:43</td></tr>
324 <tr><td>"14:25"</td><td>yyyy-mm-dd.19:25:00</td></tr> 372 <tr><td>"14:25"</td><td>yyyy-mm-dd.19:25:00</td></tr>
325 <tr><td>"8:47:11"</td><td>yyyy-mm-dd.13:47:11</td></tr> 373 <tr><td>"8:47:11"</td><td>yyyy-mm-dd.13:47:11</td></tr>
326 <tr><td>"."</td><td>"right now"</td></tr> 374 <tr><td>"."</td><td>"right now"</td></tr>
327 </table> 375 </table>
328 376 <li>Link values are printed as node designators. When given as an argument,
329 <h4>Specific Command help</h4> 377 node designators and key strings are both accepted.
330 378 <li>Multilink values are printed as lists of node designators joined by commas.
331 <pre> 379 When given as an argument, node designators and key strings are both
332 history: 380 accepted; an empty string, a single node, or a list of nodes joined by
333 Usage: history designator 381 commas is accepted.
334 Show the history entries of a designator. 382 </ul>
335 383 When multiple nodes are specified to the roundup get or roundup set
336 Lists the journal entries for the node identified by the designator. 384 commands, the specified properties are retrieved or set on all the listed
337 385 nodes.
338 find: 386 <p>
339 Usage: find classname propname=value ... 387 When multiple results are returned by the roundup get or roundup find
340 Find the nodes of the given class with a given property value. 388 commands, they are printed one per line (default) or joined by commas (with
341 389 the -c) option.
342 Find the nodes of the given class with a given property value. The 390 <p>
343 value may be either the nodeid of the linked node, or its key value. 391 Where the command changes data, a login name/password is required. The
344 392 login may be specified as either "name" or "name:password".
345 list: 393 <ul>
346 Usage: list classname [property] 394 <li>ROUNDUP_LOGIN environment variable
347 List the instances of a class. 395 <li>the -u command-line option
348 396 </ul>
349 Lists all instances of the given class along. If the property is not 397 If either the name or password is not supplied, they are obtained from the
350 specified, the "label" property is used. The label property is tried 398 command-line.
351 in order: the key, "name", "title" and then the first property,
352 alphabetically.
353
354 retire:
355 Usage: retire designator[,designator]*
356 Retire the node specified by designator.
357
358 This action indicates that a particular node is not to be retrieved by
359 the list or find commands, and its key value may be re-used.
360
361 create:
362 Usage: create classname property=value ...
363 Create a new entry of a given class.
364
365 This creates a new entry of the given class using the property
366 name=value arguments provided on the command line after the "create"
367 command.
368
369 get:
370 Usage: get property designator[,designator]*
371 Get the given property of one or more designator(s).
372
373 Retrieves the property value of the nodes specified by the designators.
374
375 spec:
376 Usage: spec classname
377 Show the properties for a classname.
378
379 This lists the properties for a given class.
380
381 set:
382 Usage: set designator[,designator]* propname=value ...
383 Set the given property of one or more designator(s).
384
385 Sets the property to the value for all designators given.
386
387 init:
388 Usage: init [template [backend [admin password]]]
389 Initialise a new Roundup instance.
390
391 The command will prompt for the instance home directory (if not supplied
392 through INSTANCE_HOME or the -i option. The template, backend and admin
393 password may be specified on the command-line as arguments, in that order.
394
395 freshen:
396 Usage: freshen
397 Freshen an existing instance. **DO NOT USE**
398
399 This currently kills databases!!!!
400
401 This action should generally not be used. It reads in an instance
402 database and writes it again. In the future, is may also update
403 instance code to account for changes in templates. It's probably wise
404 not to use it anyway. Until we're sure it won't break things...
405 </pre>
406 399
407 <h3><a name="web">Web Interface</a></h3> 400 <h3><a name="web">Web Interface</a></h3>
408 T.B.D. 401 T.B.D.
409 402
410 <h3><a name="mail">E-Mail Gateway</a></h3> 403 <h3><a name="mail">E-Mail Gateway</a></h3>
460 are calling the create() method to create a new node). If an auditor raises 453 are calling the create() method to create a new node). If an auditor raises
461 an exception, the original message is bounced back to the sender with the 454 an exception, the original message is bounced back to the sender with the
462 explanatory message given in the exception. 455 explanatory message given in the exception.
463 456
464 <p><hr> 457 <p><hr>
458 <h2><a name="custom">Customising Roundup</a></h2>
459
460 Instances have the following structure:
461 <table>
462 <tr><td valign=top><strong>dbinit.py</strong></td>
463 <td>Holds the instance schema</td></tr>
464 <tr><td valign=top><strong>instance_config.py</strong></td>
465 <td>Holds the basic instance configuration</td></tr>
466 <tr><td valign=top><strong>interfaces.py</strong></td>
467 <td>Defines the Web and E-Mail interfaces for the instance</td></tr>
468 <tr><td valign=top><strong>select_db.py</strong></td>
469 <td>Selects the database back-end for the instance</td></tr>
470 <tr><td valign=top><strong>db/</strong></td>
471 <td>Holds the instance's database</td></tr>
472 <tr><td valign=top><strong>db/files/</strong></td>
473 <td>Holds the instance's upload files and messages</td></tr>
474 <tr><td valign=top><strong>detectors/</strong></td>
475 <td>Auditors and reactors for this instance</td></tr>
476 <tr><td valign=top><strong>html/</strong></td>
477 <td>Web interface templates, images and style sheets</td></tr>
478 </table>
479
480 <h3><a name="custinst">Instance Schema</a></h3>
481 An instance schema defines what data is stored in the instance's database.
482 The two schemas shipped with Roundup turn it into a typical software bug
483 tracker (the extended schema allowing for support issues as well as bugs).
484 Schemas are defined using Python code. The "classic" schema looks like
485 this:
486 <p>
487 <pre>
488 pri = Class(db, "priority", name=String(), order=String())
489 pri.setkey("name")
490 pri.create(name="critical", order="1")
491 pri.create(name="urgent", order="2")
492 pri.create(name="bug", order="3")
493 pri.create(name="feature", order="4")
494 pri.create(name="wish", order="5")
495
496 stat = Class(db, "status", name=String(), order=String())
497 stat.setkey("name")
498 stat.create(name="unread", order="1")
499 stat.create(name="deferred", order="2")
500 stat.create(name="chatting", order="3")
501 stat.create(name="need-eg", order="4")
502 stat.create(name="in-progress", order="5")
503 stat.create(name="testing", order="6")
504 stat.create(name="done-cbb", order="7")
505 stat.create(name="resolved", order="8")
506
507 keyword = Class(db, "keyword", name=String())
508 keyword.setkey("name")
509
510 user = Class(db, "user", username=String(), password=String(),
511 address=String(), realname=String(), phone=String(), organisation=String())
512 user.setkey("username")
513 user.create(username="admin", password=adminpw, address=instance_config.ADMIN_EMAIL)
514
515 msg = FileClass(db, "msg", author=Link("user"), recipients=Multilink("user"),
516 date=Date(), summary=String(), files=Multilink("file"))
517
518 file = FileClass(db, "file", name=String(), type=String())
519
520 issue = IssueClass(db, "issue", assignedto=Link("user"),
521 topic=Multilink("keyword"), priority=Link("priority"), status=Link("status"))
522 issue.setkey('title')
523 </pre>
524
525 <h4>Class, FileClass, IssueClass - creating a new information store</h4>
526 A <em>Class</em> defines a particular class (or type) of data that will be
527 stored in the database. In the instance above, we've defined 7 classes of
528 information:
529 <dl>
530 <dt><strong>priority</strong>
531 <dd>Defines the possible levels of urgency for issues.
532 <dt><strong>status</strong>
533 <dd>Defines the possible states of processing the issue may be in.
534 <dt><strong>keyword</strong>
535 <dd>Initially empty, will hold keywords useful for searching issues.
536 <dt><strong>user</strong>
537 <dd>Initially holding the "admin" user, will eventually have an entry
538 for all users using roundup.
539 <dt><strong>msg</strong>
540 <dd>Initially empty, will all e-mail messages sent to or generated by roundup.
541 <dt><strong>file</strong>
542 <dd>Initially empty, will all files attached to issues.
543 <dt><strong>issue</strong>
544 <dd>Initially emtyp, this is where the issue information is stored.
545 </dl>
546 <p>
547 We define the "priority" and "status" classes to allow two things: reduction in the
548 amount of information stored on the issue and more powerful, accurate
549 searching of issues by priority and status. By only requiring a link on
550 the issue (which is stored as a single number) we reduce the chance
551 that someone mis-types a priority or status - or simply makes a new one
552 up.
553 <p>
554
555 <strong>Class</strong>
556 <br>
557 Class is the basic store of information.
558
559 <p>
560
561 <strong>FileClass</strong>
562 <br>
563 FileClasses save their "content" attribute off in a separate file from the
564 rest of the database. This reduces the number of large entries in the
565 database, which generally makes databases more efficient, and also allows
566 us to use command-line tools to operate on the files. They are stored in
567 the files sub-directory of the db directory in your instance.
568
569 <p>
570
571 <strong>IssueClass</strong>
572 <br>
573 IssueClasses automatically include the "messages", "files", "nosy", and
574 "superseder" properties.
575 <p>
576 The messages and files properties list the links to the messages and files
577 related to the issue. The nosy property is a list of links to users who
578 wish to be informed of changes to the issue - they get "CC'ed" e-mails when
579 messages are sent to or generated by the issue. The nosy reactor (in the
580 detectors directory) handles this action. The superceder link indicates an
581 issue which has superceded this one.
582 <p>
583 They also have the dynamically generated
584 "creation", "activity" and "creator" properties.
585 <p>
586 The value of the "creation" property is the date when an item was created,
587 and the value of the "activity" property is the date when any property on
588 the item was last edited (equivalently, these are the dates on the first
589 and last records in the item's journal). The "creator" property holds a
590 link to the user that created the issue.
591
592 <h4>setkey(property)</h4>
593 Select a String property of the class to be the key property. The key
594 property muse be unique, and allows references to the items in the class by
595 the content of the key property. That is, we can refer to users by their
596 username, e.g. let's say that there's an issue in roundup, issue 23. There's
597 also a user, richard who happens to be user 2. To assign an issue to him,
598 we could do either of:
599 <p>
600 <blockquote><tt>roundup-admin set issue assignedto=2</tt></blockquote>
601 <p>
602 or
603 <p>
604 <blockquote><tt>roundup-admin set issue
605 assignedto=richard</tt></blockquote>
606 <p>
607 Note, the same thing can be done in the web and e-mail interfaces.
608
609 <h4>create(information)</h4>
610 Create an item in the database. This is generally used to create items in
611 the "definitional" classes like "priority" and "status".
612
613 <h3><a name="custweb">Web Interface</a></h3>
614
615 <p><hr>
465 <h2><a name="ack">Acknowledgements</a></h2> 616 <h2><a name="ack">Acknowledgements</a></h2>
466 617
467 Go Ping, you rock! Also, go Bizar Software for letting me implement this 618 Go Ping, you rock! Also, go Bizar Software for letting me implement this
468 system on their time. 619 system on their time.
469 620
470 <p>&nbsp;</p> 621 <p>&nbsp;</p>
471 <hr> 622 <hr>
472 $Id: index.html,v 1.3 2001-09-29 13:44:44 richard Exp $ 623 $Id: index.html,v 1.4 2001-09-29 23:48:06 richard Exp $
473 <p>&nbsp;</p> 624 <p>&nbsp;</p>
474 625
475 </body></html> 626 </body></html>
476 627

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