Code

extended date syntax to make range searches even more useful
[roundup.git] / doc / user_guide.txt
1 ==========
2 User Guide
3 ==========
5 :Version: $Revision: 1.21 $
7 .. contents::
9 Note: this document will refer to *issues* as the primary store of information
10 in the tracker. This is the default of the classic template, bubt may vary in
11 any given installation.
13 Your Tracker in a Nutshell
14 ==========================
16 Your tracker holds information about issues in bundles we call *items*. An
17 item may be an *issue* (a bug or feature request) or a *user*. The issue-ness or
18 user-ness is called the item's *class*. So, for bug reports and features, the
19 class is "issue", and for users the class is "user".
21 Each item in the tracker has an id number that identifies it along with its
22 item class. To identify a particular issue or user, we combine the class with
23 the number to create a unique label, so that user 1 (who, incidentally, is
24 *always* the "admin" user) is referred to as "user1".  Issue number 315 is
25 referred to as "issue315". We call that label the item's *designator*.
27 Accessing the Tracker
28 ---------------------
30 You may access your tracker through one of three ways:
32 1. through the `web interface`_,
33 2. through the `e-mail gateway`_, or
34 3. using the `command line tool`_.
36 The last is usually only used by administrators. Most users will use the web
37 and email interfaces. All three are explained below.
40 Entering values in your Tracker
41 -------------------------------
43 All interfaces to your tracker use the same format for entering values. This
44 means the web interface for entering a new issue, the web interface for
45 searching issues, the email interface and even the command-line administration
46 tool.
49 String and Numeric properties
50 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52 These fields just take a simple text value, like ``It's broken``.
55 Boolean properties
56 ~~~~~~~~~~~~~~~~~~
58 These fields take a value which indicates "yes"/"no", "true"/"false",
59 "1"/"0" or "on"/"off".
62 Constrained (link and multilink) properties
63 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65 Fields like "Assigned To" and "Topics" hold references to items in other
66 classes ("user" and "keyword" in those two cases.)
68 Sometimes, the selection is done through a menu, like in the "Assigned To"
69 field.
71 Where the input is not a simple menu selection, we use a comma-separated
72 list of values to indicated which values of "user" or "keyword" are
73 interesting. The values may be either numeric ids or the
74 names of items. The special value "-1" may be used to match items where the
75 property is not set. For example, the following searches on the issues:
77 ``assignedto=richard,george``
78   match issues which are assigned to richard or george.
79 ``assignedto=-1``
80   match issues that are not assigned to a user.
81 ``assignedto=2,3,40``
82   match issues that are assigned to users 2, 3 or 40.
83 ``topic=user interface``
84   match issues with the keyword "user interface" in their topic list
85 ``topic=web interface,email interface``
86   match issues with the keyword "web interface" or "email interface" in
87   their topic list
88 ``topic=-1``
89   match issues with no topics set
92 Date properties
93 ~~~~~~~~~~~~~~~
95 Some fields in the search page (e.g. "Activity" or "Creation date") hold
96 dates.  A plain date entered as a search field will match that date exactly
97 in the database.  We may also accept ranges of dates. You can specify range
98 of dates in one of two formats:
100 1. English syntax::
102     [From <value>][To <value>]
104    Keywords "From" and "To" are case insensitive. Keyword "From" is optional.
106 2. "Geek" syntax::
108     [<value>];[<value>]
110 Either first or second ``<value>`` can be omitted in both syntaxes.
112 For example, if you enter string "from 9:00" to "Creation date" field,
113 roundup will find  all issues, that were created today since 9 AM.
115 Searching of "-2m; -1m" on activity field gives you issues which were
116 active between period of time since 2 months up-till month ago.
118 Other possible examples (consider local time is Sat Mar  8 22:07:48 2003)::
120     >>> Range("from 2-12 to 4-2")
121     <Range from 2003-02-12.00:00:00 to 2003-04-02.00:00:00>
122     
123     >>> Range("FROM 18:00 TO +2m")
124     <Range from 2003-03-08.18:00:00 to 2003-05-08.20:07:48>
125     
126     >>> Range("12:00;")
127     <Range from 2003-03-08.12:00:00 to None>
128     
129     >>> Range("tO +3d")
130     <Range from None to 2003-03-11.20:07:48>
131     
132     >>> Range("2002-11-10; 2002-12-12")
133     <Range from 2002-11-10.00:00:00 to 2002-12-12.00:00:00>
135     >>> Range("; 20:00 +1d")
136     <Range from None to 2003-03-09.20:00:00>
138     >>> Range("2003")
139     <Range from 2003-01-01.00:00:00 to 2003-12-31.23:59:59>
141     >>> Range("2003-04")
142     <Range from 2003-04-01.00:00:00 to 2003-04-30.23:59:59>
143     
145 Interval properties
146 ~~~~~~~~~~~~~~~~~~~
148 XXX explain...
150 When searching on interval properties use the same syntax as for dates.
153 Web Interface
154 =============
156 Note: this document contains screenshots of the default look and feel. Your
157 site may have a slightly (or very) different look, but the functionality will
158 be very similar, and the concepts still hold.
160 The web interface is broken up into the following parts:
162 1. `lists of items`_,
163 2. `display, edit or entry of an item`_, and
164 3. `searching page`_.
167 Lists of Items
168 --------------
170 The first thing you'll see when you log into Roundup will be a list of open
171 (ie. not resolved) issues. This list has been generated by a bunch of controls
172 `under the covers`_ but for now, you can see something like:
174 .. img: images/index_logged_out.png
176 The screen is divided up into three sections:
178 .. img: images/page_layout.png
180 you may either register or log in. Registration takes you to:
182 .. img: images/registration.png
184 Once you're logged in, the screen changes slightly to:
186 .. img: images/index_logged_in.png
188 Note that the sidebar menu has changed slightly, so you can now get to your
189 "My Details" page:
191 .. img: images/my_details.png
193 Note the new information on this page - the history.
196 Display, edit or entry of an item
197 ---------------------------------
199 Create a new issue with "create new" under the issue subheading. This will
200 take you to:
202 .. img: images/new_issue.png
204 The `nosy list`_ is explained below.
205 Enter some information and click "submit new entry" and you'll be rewarded
206 with:
208 .. img: images/new_issue_created.png
210 or, if you don't enter all the required information (or some other error
211 occurs) you'll get something like:
213 .. img: images/new_issue_error.png
216 Searching Page
217 --------------
219 See `entering values in your tracker`_ for an explanation of what you may 
220 type into the search form.
224 Under the covers
225 ~~~~~~~~~~~~~~~~
227 The searching page converts your selections into the following arguments:
229 ========== =============================================================
230 Argument   Description
231 ========== =============================================================
232 :sort      sort by prop name, optionally preceeded with '-'
233            to give descending or nothing for ascending sorting.
234 :group     group by prop name, optionally preceeded with '-' or
235            to sort in descending or nothing for ascending order.
236 :filter    selects which props should be displayed in the filter
237            section. Default is all.           
238 :columns   selects the columns that should be displayed.
239            Default is all.                     
240 propname   selects the values the item properties given by propname
241            must have (very basic search/filter).
242 ========== =============================================================
244 You may manually write URLS that contain these arguments, like so (whitespace
245 has been added for clarity)::
247     /issue?status=unread,in-progress,resolved&
248         topic=security,ui&
249         :group=priority&
250         :sort=-activity&
251         :filters=status,topic&
252         :columns=title,status,fixer
255 Access Controls
256 ---------------
258 User access is controlled through Permissions. These are are grouped into
259 Roles, and users have a comma-separated list of Roles assigned to them.
261 Permissions divide access controls up into answering questions like:
263 - may the user edit issues ("Edit", "issue")
264 - is the user allowed to use the web interface ("Web Access")
265 - may the user edit other user's Roles through the web ("Web Roles")
267 Any number of new Permissions and Roles may be created as described in the
268 customisation documentation. Examples of new access controls are:
270 - only managers may sign off issues as complete
271 - don't give users who register through email web access
272 - let some users edit the details of all users
275 E-Mail Gateway
276 ==============
278 E-mail sent to Roundup is examined for several pieces of information:
280 1. `subject-line information`_ identifying the purpose of the e-mail
281 2. `e-mail message content`_ which is to be extracted
282 3. e-mail attachments which should be associated with the message
284 Subject-line information
285 ------------------------
287 The subject line of the incoming message is examined to find one of:
289 1. the item that the message is responding to,
290 2. the type of item the message should create, or
291 3. we default the item class and try some trickiness
293 If the subject line contains a prefix in ``[square brackets]`` then we're
294 looking at case 1 or 2 above. Note that any "re:" or "fwd:" prefixes are
295 stripped off the subject line before we start looking for real information.
297 If an item designator (class name and id number, for example ``issue123``)
298 is found there, a new "msg" item is added to the "messages" property for
299 that item, and any new "file" items are added to the "files" property for
300 the item.
302 If just an item class name is found there, we attempt to create a new item of
303 that class with its "messages" property initialized to contain the new "msg"
304 item and its "files" property initialized to contain any new "file" items.
306 The third case above - where no ``[information]`` is provided, the tracker's
307 ``MAIL_DEFAULT_CLASS`` configuration variable defines what class of item
308 the message relates to. We try to match the subject line to an existing
309 item of the default class, and if there's a match, the message is related to
310 that matched item. If not, then a new item of the default class is created.
312 Setting Properties
313 ~~~~~~~~~~~~~~~~~~
315 The e-mail interface also provides a simple way to set properties on items. At
316 the end of the subject line, propname=value pairs can be specified in square
317 brackets, using the same conventions as for the roundup set shell command.
319 For example,
321 - setting the priority of an issue::
323    Subject: Re: [issue1] the coffee machine is broken! [priority=urgent]
325 - adding yourself to a nosy list::
327    Subject: Re: [issue2] we're out of widgets [nosy=+richard]
329 - setting the nosy list to just you and cliff::
331    Subject: Re: [issue2] we're out of widgets [nosy=richard,cliff]
333 - removing yourself from a nosy list and setting the priority::
335    Subject: Re: [issue2] we're out of widgets [nosy=-richard;priority=bug]
337 In all cases, the message relates to issue 2. The ``Re:`` prefix is stripped
338 off.
341 Automatic Properties
342 ~~~~~~~~~~~~~~~~~~~~
344 **status of new issues**
345  When a new message is received that is not identified as being related to an
346  existing issue, it creates a new issue. The status of the new issue is
347  defaulted to "unread".
349 **reopening of resolved issues**
350  When a message is is received for a resolved issue, the issue status is
351  automatically reset to "chatting" to indicate new information has been
352  received.
355 E-Mail Message Content
356 ----------------------
358 Roundup only associates plain text (MIME type ``text/plain``) as messages for
359 items. Any other parts of a message are associated as downloadable files. If
360 no plain text part is found, the message is rejected.
362 To do this, incoming messages are examined for multiple parts:
364 * In a multipart/mixed message or part, each subpart is extracted and
365   examined. The text/plain subparts are assembled to form the textual body
366   of the message, to be stored in the file associated with a "msg" class
367   item. Any parts of other types are each stored in separate files and
368   given "file" class items that are linked to the "msg" item.
369 * In a multipart/alternative message or part, we look for a text/plain
370   subpart and ignore the other parts.
372 If the message is a response to a previous message, and contains quoted
373 sections, then these will be stripped out of the message if the
374 ``EMAIL_KEEP_QUOTED_TEXT`` configuration variable is set to ``'no'``.
376 Message summary
377 ~~~~~~~~~~~~~~~
379 The "summary" property on message items is taken from the first non-quoting
380 section in the message body. The message body is divided into sections by blank
381 lines. Sections where the second and all subsequent lines begin with a ">" or
382 "|" character are considered "quoting sections". The first line of the first
383 non-quoting section becomes the summary of the message.
386 Address handling
387 ----------------
389 All of the addresses in the ``To:`` and ``Cc:`` headers of the incoming
390 message are
391 looked up among the tracker users, and the corresponding users are placed
392 in the
393 "recipients" property on the new "msg" item. The address in the ``From:`` header
394 similarly determines the "author" property of the new "msg" item. The default
395 handling for addresses that don't have corresponding users is to create new
396 users with no passwords and a username equal to the address.
398 The addresses mentioned in the ``To:``, ``From:`` and ``Cc:`` headers of
399 the message may be added to the `nosy list`_ depending on:
401 ``ADD_AUTHOR_TO_NOSY``
402  Does the author of a message get placed on the nosy list automatically?
403  If 'new' is used, then the author will only be added when a message
404  creates a new issue. If 'yes', then the author will be added on followups
405  too. If 'no', they're never added to the nosy.
407 ``ADD_RECIPIENTS_TO_NOSY``
408  Do the recipients (To:, Cc:) of a message get placed on the nosy list?
409  If 'new' is used, then the recipients will only be added when a message
410  creates a new issue. If 'yes', then the recipients will be added on
411  followups too. If 'no', they're never added to the nosy.
414 Nosy List
415 ~~~~~~~~~
417 Roundup watches for additions to the "messages" property of items.
419 When a new message is added, it is sent to all the users
420 on the "nosy" list for the item that are not already on the "recipients" list
421 of the message. Those users are then appended to the "recipients" property on
422 the message, so multiple copies of a message are never sent to the same user.
423 The journal recorded by the hyperdatabase on the "recipients" property then
424 provides a log of when the message was sent to whom.
426 If the author of the message is also in the nosy list for the item that the
427 message is attached to, then the config var ``MESSAGES_TO_AUTHOR`` is queried
428 to determine if they get a nosy list copy of the message too.
431 Mail gateway script command line
432 --------------------------------
434 The roundup mail gateway may be called in one of three ways:
436  . with an instance home as the only argument,
437  . with both an instance home and a mail spool file, or
438  . with both an instance home and a pop server account.
439  
440 It also supports optional -C and -S arguments that allows you to set a
441 fields for a class created by the roundup-mailgw. The default class if
442 not specified is msg, but the other classes: issue, file, user can
443 also be used. The -S or --set options uses the same
444 property=value[;property=value] notation accepted by the command line
445 roundup command or the commands that can be given on the Subject line
446 of an email message.
448 It can let you set the type of the message on a per email address basis.
450 PIPE:
451  In the first case, the mail gateway reads a single message from the
452  standard input and submits the message to the roundup.mailgw module.
454 UNIX mailbox:
455  In the second case, the gateway reads all messages from the mail spool
456  file and submits each in turn to the roundup.mailgw module. The file is
457  emptied once all messages have been successfully handled. The file is
458  specified as::
460    mailbox /path/to/mailbox
462 POP:
463  In the third case, the gateway reads all messages from the POP server
464  specified and submits each in turn to the roundup.mailgw module. The
465  server is specified as::
467     pop username:password@server
469  The username and password may be omitted::
471     pop username@server
472     pop server
474  are both valid. The username and/or password will be prompted for if
475  not supplied on the command-line.
477 APOP:
478  Same as POP, but using Authenticated POP::
480     apop username:password@server
483 Command Line Tool
484 =================
486 The basic usage is::
488  Usage: roundup-admin [options] [<command> <arguments>]
490  Options:
491   -i instance home  -- specify the issue tracker "home directory" to administer
492   -u                -- the user[:password] to use for commands
493   -d                -- print full designators not just class id numbers
494   -c                -- when outputting lists of data, comma-separate them.
495                Same as '-S ","'.
496   -S <string>       -- when outputting lists of data, string-separate them
497   -s                -- when outputting lists of data, space-separate them.
498                Same as '-S " "'.
500   Only one of -s, -c or -S can be specified.
502  Help:
503   roundup-admin -h
504   roundup-admin help                       -- this help
505   roundup-admin help <command>             -- command-specific help
506   roundup-admin help all                   -- all available help
508  Commands: 
509   commit
510   create classname property=value ...
511   display designator[,designator]*
512   export [class[,class]] export_dir
513   find classname propname=value ...
514   get property designator[,designator]*
515   help topic
516   history designator
517   import import_dir
518   initialise [adminpw]
519   install [template [backend [admin password]]]
520   list classname [property]
521   pack period | date
522   reindex
523   retire designator[,designator]*
524   rollback
525   security [Role name]
526   set items property=value property=value ...
527   specification classname
528   table classname [property[,property]*]
529  Commands may be abbreviated as long as the abbreviation matches only one
530  command, e.g. l == li == lis == list.
533 All commands (except help) require a tracker specifier. This is just the
534 path to the roundup tracker you're working with. A roundup tracker is where
535 roundup keeps the database and configuration file that defines an issue
536 tracker. It may be thought of as the issue tracker's "home directory".
537 It may be specified in the environment variable ``TRACKER_HOME`` or on
538 the command line as "``-i tracker``".
540 A designator is a classname and an itemid concatenated, eg. bug1, user10, ...
541 Property values are represented as strings in command arguments and in the
542 printed results:
544 - Strings are, well, strings.
545 - Password values will display as their encoded value.
546 - Date values are printed in the full date format in the local time zone,
547   and accepted in the full format or any of the partial formats explained
548   below.::
549   
550     Input of...        Means...
551     "2000-04-17.03:45" 2000-04-17.08:45:00
552     "2000-04-17"       2000-04-17.00:00:00
553     "01-25"            yyyy-01-25.00:00:00
554     "08-13.22:13"      yyyy-08-14.03:13:00
555     "11-07.09:32:43"   yyyy-11-07.14:32:43
556     "14:25"            yyyy-mm-dd.19:25:00
557     "8:47:11"          yyyy-mm-dd.13:47:11
558     "2003"             2003-01-01.00:00:00
559     "2003-04"          2003-04-01.00:00:00
560     "."                "right now"
561     
562 - Link values are printed as item designators. When given as an argument,
563   item designators and key strings are both accepted.
564 - Multilink values are printed as lists of item designators joined by
565   commas. When given as an argument, item designators and key strings are
566   both accepted; an empty string, a single item, or a list of items joined
567   by commas is accepted.
568   
569 When multiple items are specified to the roundup get or roundup set
570 commands, the specified properties are retrieved or set on all the listed
571 items.  When multiple results are returned by the roundup get or roundup
572 find commands, they are printed one per line (default) or joined by commas
573 (with the "``-c``" option).
575 Where the command changes data, a login name/password is required. The login may
576 be specified as either "``name``" or "``name:password``".
578 - ``ROUNDUP_LOGIN`` environment variable
579 - the "``-u``" command-line option
581 If either the name or password is not supplied, they are obtained from the
582 command-line.
584 Using with the shell
585 --------------------
587 With version 0.6.0 or newer of roundup which supports: multiple
588 designators to display and the -d, -S and -s flags.
590 To find all messages regarding chatting issues that
591 contain the word "spam", for example, you could execute the
592 following command from the directory where the database
593 dumps its files::
595     shell% for issue in `roundup-admin -ds find issue status=chatting`; do
596     > grep -l spam `roundup-admin -ds ' ' get messages $issue`
597     > done
598     msg23
599     msg49
600     msg50
601     msg61
602     shell%
604 Or, using the -dc option, this can be written as a single command::
606     shell% grep -l spam `roundup get messages \
607         \`roundup -dc find issue status=chatting\``
608     msg23
609     msg49
610     msg50
611     msg61
612     shell%
614 You can also display issue contents::
616     shell% roundup-admin display `roundup-admin -dc get messages \
617                issue3,issue1`
618     files: []
619     inreplyto: None
620     recipients: []
621     author: 1
622     date: 2003-02-16.21:23:03
623     messageid: None
624     summary: jkdskldjf
625     files: []
626     inreplyto: None
627     recipients: []
628     author: 1
629     date: 2003-02-15.01:59:11
630     messageid: None
631     summary: jlkfjadsf    
632     
633 or status::
635     shell% roundup-admin get name `/tools/roundup/bin/roundup-admin \
636           -dc -i /var/roundup/sysadmin get status issue3,issue1`
637     unread
638     deferred
640 or status on a single line::
642     shell% echo `roundup-admin get name \`/tools/roundup/bin/roundup-admin \
643              -dc -i /var/roundup/sysadmin get status issue3,issue1\``
644     unread deferred
646 which is the same as::
648     shell% roundup-admin -s get name `/tools/roundup/bin/roundup-admin \
649              -dc -i /var/roundup/sysadmin get status issue3,issue1`
650     unread deferred
652 Also the tautological::
654    shell% roundup-admin get name \
655       `roundup-admin -dc get status \`roundup-admin -dc find issue \
656           status=chatting\``
657    chatting
658    chatting
660 Remember the roundup commands that accept multiple designators accept
661 them ',' separated so using '-dc' is almost always required.
663 -----------------
665 Back to `Table of Contents`_
667 .. _`Table of Contents`: index.html
668 .. _`customisation documentation`: customizing.html