Code

- queries on a per-user basis, and public queries (sf "bug" 891798 :)
[roundup.git] / doc / user_guide.txt
1 ==========
2 User Guide
3 ==========
5 :Version: $Revision: 1.26 $
7 .. contents::
9 Note: this document will refer to *issues* as the primary store of
10 information in the tracker. This is the default of the classic template,
11 but may vary in any given installation.
14 Your Tracker in a Nutshell
15 ==========================
17 Your tracker holds information about issues in bundles we call *items*.
18 An item may be an *issue* (a bug or feature request) or a *user*. The
19 issue-ness or user-ness is called the item's *class*. So, for bug
20 reports and features, the class is "issue", and for users the class is
21 "user".
23 Each item in the tracker has an id number that identifies it along with
24 its item class. To identify a particular issue or user, we combine the
25 class with the number to create a unique label, so that user 1 (who,
26 incidentally, is *always* the "admin" user) is referred to as "user1".
27 Issue number 315 is referred to as "issue315". We call that label the
28 item's *designator*.
30 Items in the database are never deleted, they're just "retired". You
31 can still refer to them by ID - hence removing an item won't break
32 references to the item. It's just that the item won't appear in any
33 listings.
36 Accessing the Tracker
37 ---------------------
39 You may access your tracker through one of three ways:
41 1. through the `web interface`_,
42 2. through the `e-mail gateway`_, or
43 3. using the `command line tool`_.
45 The last is usually only used by administrators. Most users will use the
46 web and email interfaces. All three are explained below.
49 Issue life cycles in Roundup
50 ----------------------------
52 New issues may be submitted via the web or email.
54 By default, the issue will have the status "unread". If another message
55 is received for the issue, its status will change to "chatting". 
57 The "home" page for a tracker will generally display all issues which
58 are not "resolved.
60 If an issue is closed, and a new message is received then it'll be
61 reopened to the state of "chatting".
64 Entering values in your Tracker
65 -------------------------------
67 All interfaces to your tracker use the same format for entering values.
68 This means the web interface for entering a new issue, the web interface
69 for searching issues, the email interface and even the command-line
70 administration tool.
73 String and Numeric properties
74 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
76 These fields just take a simple text value, like ``It's broken``.
79 Boolean properties
80 ~~~~~~~~~~~~~~~~~~
82 These fields take a value which indicates "yes"/"no", "true"/"false",
83 "1"/"0" or "on"/"off".
86 Constrained (link and multilink) properties
87 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89 Fields like "Assigned To" and "Topics" hold references to items in other
90 classes ("user" and "keyword" in those two cases.)
92 Sometimes, the selection is done through a menu, like in the "Assigned
93 To" field.
95 Where the input is not a simple menu selection, we use a comma-separated
96 list of values to indicated which values of "user" or "keyword" are
97 interesting. The values may be either numeric ids or the names of items.
98 The special value "-1" may be used to match items where the property is
99 not set. For example, the following searches on the issues:
101 ``assignedto=richard,george``
102   match issues which are assigned to richard or george.
103 ``assignedto=-1``
104   match issues that are not assigned to a user.
105 ``assignedto=2,3,40``
106   match issues that are assigned to users 2, 3 or 40.
107 ``topic=user interface``
108   match issues with the keyword "user interface" in their topic list
109 ``topic=web interface,email interface``
110   match issues with the keyword "web interface" or "email interface" in
111   their topic list
112 ``topic=-1``
113   match issues with no topics set
116 Date properties
117 ~~~~~~~~~~~~~~~
119 Some fields in the search page (e.g. "Activity" or "Creation date") hold
120 dates.  A plain date entered as a search field will match that date
121 exactly in the database.  We may also accept ranges of dates. You can
122 specify range of dates in one of two formats:
124 1. English syntax::
126     [From <value>][To <value>]
128    Keywords "From" and "To" are case insensitive. Keyword "From" is
129    optional.
131 2. "Geek" syntax::
133     [<value>];[<value>]
135 Either first or second ``<value>`` can be omitted in both syntaxes.
137 For example, if you enter string "from 9:00" to "Creation date" field,
138 roundup will find  all issues, that were created today since 9 AM.
140 Searching of "-2m; -1m" on activity field gives you issues which were
141 active between period of time since 2 months up-till month ago.
143 Other possible examples (consider local time is Sat Mar  8 22:07:48
144 2003)::
146     >>> Range("from 2-12 to 4-2")
147     <Range from 2003-02-12.00:00:00 to 2003-04-02.00:00:00>
148     
149     >>> Range("FROM 18:00 TO +2m")
150     <Range from 2003-03-08.18:00:00 to 2003-05-08.20:07:48>
151     
152     >>> Range("12:00;")
153     <Range from 2003-03-08.12:00:00 to None>
154     
155     >>> Range("tO +3d")
156     <Range from None to 2003-03-11.20:07:48>
157     
158     >>> Range("2002-11-10; 2002-12-12")
159     <Range from 2002-11-10.00:00:00 to 2002-12-12.00:00:00>
161     >>> Range("; 20:00 +1d")
162     <Range from None to 2003-03-09.20:00:00>
164     >>> Range("2003")
165     <Range from 2003-01-01.00:00:00 to 2003-12-31.23:59:59>
167     >>> Range("2003-04")
168     <Range from 2003-04-01.00:00:00 to 2003-04-30.23:59:59>
169     
171 Interval properties
172 ~~~~~~~~~~~~~~~~~~~
174 XXX explain...
176 When searching on interval properties use the same syntax as for dates.
179 Web Interface
180 =============
182 Note: this document contains screenshots of the default look and feel.
183 Your site may have a slightly (or very) different look, but the
184 functionality will be very similar, and the concepts still hold.
186 The web interface is broken up into the following parts:
188 1. `lists of items`_,
189 2. `display, edit or entry of an item`_, and
190 3. `searching page`_.
193 Lists of Items
194 --------------
196 The first thing you'll see when you log into Roundup will be a list of
197 open (ie. not resolved) issues. This list has been generated by a bunch
198 of controls `under the covers`_ but for now, you can see something like:
200 .. img: images/index_logged_out.png
202 The screen is divided up into three sections:
204 .. img: images/page_layout.png
206 you may either register or log in. Registration takes you to:
208 .. img: images/registration.png
210 Once you're logged in, the screen changes slightly to:
212 .. img: images/index_logged_in.png
214 Note that the sidebar menu has changed slightly, so you can now get to
215 your "My Details" page:
217 .. img: images/my_details.png
219 Note the new information on this page - the history.
222 Display, edit or entry of an item
223 ---------------------------------
225 Create a new issue with "create new" under the issue subheading. This
226 will take you to:
228 .. img: images/new_issue.png
230 The `nosy list`_ is explained below. Enter some information and click
231 "submit new entry" and you'll be rewarded with:
233 .. img: images/new_issue_created.png
235 or, if you don't enter all the required information (or some other error
236 occurs) you'll get something like:
238 .. img: images/new_issue_error.png
241 Searching Page
242 --------------
244 See `entering values in your tracker`_ for an explanation of what you
245 may type into the search form.
248 Saving queries
249 ~~~~~~~~~~~~~~
251 You may save queries in the tracker by giving the query a name. Each user
252 may only have one query with a given name - if a subsequent search is
253 performed with the same query name supplied, then it will edit the
254 existing query of the same name.
256 Queries may be marked as "private". These queries are only visible to the
257 user that created them. If they're not marked "private" then all other
258 users may include the query in their list of "Your Queries". Marking it as
259 private at a later date does not affect users already using the query, nor
260 does deleting the query.
262 If a user subsequently creates or edits a public query, a new personal
263 version of that query is made, with the same editing rules as described
264 above.
267 Under the covers
268 ~~~~~~~~~~~~~~~~
270 The searching page converts your selections into the following
271 arguments:
273 ========== =============================================================
274 Argument   Description
275 ========== =============================================================
276 :sort      sort by prop name, optionally preceeded with '-' to give
277            descending or nothing for ascending sorting.
278 :group     group by prop name, optionally preceeded with '-' or to sort
279            in descending or nothing for ascending order.
280 :filter    selects which props should be displayed in the filter
281            section. Default is all.           
282 :columns   selects the columns that should be displayed. Default is
283            all.                     
284 propname   selects the values the item properties given by propname must
285            have (very basic search/filter).
286 ========== =============================================================
288 You may manually write URLS that contain these arguments, like so
289 (whitespace has been added for clarity)::
291     /issue?status=unread,in-progress,resolved&
292         topic=security,ui&
293         :group=priority&
294         :sort=-activity&
295         :filters=status,topic&
296         :columns=title,status,fixer
299 Access Controls
300 ---------------
302 User access is controlled through Permissions. These are are grouped
303 into Roles, and users have a comma-separated list of Roles assigned to
304 them.
306 Permissions divide access controls up into answering questions like:
308 - may the user edit issues ("Edit", "issue")
309 - is the user allowed to use the web interface ("Web Access")
310 - may the user edit other user's Roles through the web ("Web Roles")
312 Any number of new Permissions and Roles may be created as described in
313 the customisation documentation. Examples of new access controls are:
315 - only managers may sign off issues as complete
316 - don't give users who register through email web access
317 - let some users edit the details of all users
320 E-Mail Gateway
321 ==============
323 E-mail sent to Roundup is examined for several pieces of information:
325 1. `subject-line information`_ identifying the purpose of the e-mail
326 2. `sender identification`_ using the sender of the message
327 3. `e-mail message content`_ which is to be extracted
328 4. e-mail attachments which should be associated with the message
331 Subject-line information
332 ------------------------
334 The subject line of the incoming message is examined to find one of:
336 1. the item that the message is responding to,
337 2. the type of item the message should create, or
338 3. we default the item class and try some trickiness
340 If the subject line contains a prefix in ``[square brackets]`` then
341 we're looking at case 1 or 2 above. Note that any "re:" or "fwd:"
342 prefixes are stripped off the subject line before we start looking for
343 real information.
345 If an item designator (class name and id number, for example
346 ``issue123``) is found there, a new "msg" item is added to the
347 "messages" property for that item, and any new "file" items are added to
348 the "files" property for the item.
350 If just an item class name is found there, we attempt to create a new
351 item of that class with its "messages" property initialized to contain
352 the new "msg" item and its "files" property initialized to contain any
353 new "file" items.
355 The third case above - where no ``[information]`` is provided, the
356 tracker's ``MAIL_DEFAULT_CLASS`` configuration variable defines what
357 class of item the message relates to. We try to match the subject line
358 to an existing item of the default class, and if there's a match, the
359 message is related to that matched item. If not, then a new item of the
360 default class is created.
363 Setting Properties
364 ~~~~~~~~~~~~~~~~~~
366 The e-mail interface also provides a simple way to set properties on
367 items. At the end of the subject line, propname=value pairs can be
368 specified in square brackets, using the same conventions as for the
369 roundup set shell command.
371 For example,
373 - setting the priority of an issue::
375    Subject: Re: [issue1] the coffee machine is broken! [priority=urgent]
377 - adding yourself to a nosy list::
379    Subject: Re: [issue2] we're out of widgets [nosy=+richard]
381 - setting the nosy list to just you and cliff::
383    Subject: Re: [issue2] we're out of widgets [nosy=richard,cliff]
385 - removing yourself from a nosy list and setting the priority::
387    Subject: Re: [issue2] we're out of widgets [nosy=-richard;priority=bug]
389 In all cases, the message relates to issue 2. The ``Re:`` prefix is
390 stripped off.
393 Automatic Properties
394 ~~~~~~~~~~~~~~~~~~~~
396 **status of new issues**
397  When a new message is received that is not identified as being related
398  to an existing issue, it creates a new issue. The status of the new
399  issue is defaulted to "unread".
401 **reopening of resolved issues**
402  When a message is is received for a resolved issue, the issue status is
403  automatically reset to "chatting" to indicate new information has been
404  received.
407 Sender identification
408 ---------------------
410 If the sender of an email is unknown to Roundup (looking up both user
411 primary email addresses and their alternate addresses) then a new user
412 will be created. The new user will have their username set to the "user"
413 part of "user@domain" in their email address. Their password will be
414 completely randomised, and they'll have to visit the web interface to
415 have it changed. Note that some sites don't allow web access by users
416 who register via email like this.
419 E-Mail Message Content
420 ----------------------
422 Roundup only associates plain text (MIME type ``text/plain``) as
423 messages for items. Any other parts of a message are associated as
424 downloadable files. If no plain text part is found, the message is
425 rejected.
427 To do this, incoming messages are examined for multiple parts:
429 * In a multipart/mixed message or part, each subpart is extracted and
430   examined. The text/plain subparts are assembled to form the textual
431   body of the message, to be stored in the file associated with a "msg"
432   class item. Any parts of other types are each stored in separate files
433   and given "file" class items that are linked to the "msg" item.
434 * In a multipart/alternative message or part, we look for a text/plain
435   subpart and ignore the other parts.
437 If the message is a response to a previous message, and contains quoted
438 sections, then these will be stripped out of the message if the
439 ``EMAIL_KEEP_QUOTED_TEXT`` configuration variable is set to ``'no'``.
441 Message summary
442 ~~~~~~~~~~~~~~~
444 The "summary" property on message items is taken from the first
445 non-quoting section in the message body. The message body is divided
446 into sections by blank lines. Sections where the second and all
447 subsequent lines begin with a ">" or "|" character are considered
448 "quoting sections". The first line of the first non-quoting section
449 becomes the summary of the message.
452 Address handling
453 ----------------
455 All of the addresses in the ``To:`` and ``Cc:`` headers of the incoming
456 message are looked up among the tracker users, and the corresponding
457 users are placed in the "recipients" property on the new "msg" item. The
458 address in the ``From:`` header similarly determines the "author"
459 property of the new "msg" item. The default handling for addresses that
460 don't have corresponding users is to create new users with no passwords
461 and a username equal to the address.
463 The addresses mentioned in the ``To:``, ``From:`` and ``Cc:`` headers of
464 the message may be added to the `nosy list`_ depending on:
466 ``ADD_AUTHOR_TO_NOSY``
467  Does the author of a message get placed on the nosy list automatically?
468  If 'new' is used, then the author will only be added when a message
469  creates a new issue. If 'yes', then the author will be added on
470  followups too. If 'no', they're never added to the nosy.
472 ``ADD_RECIPIENTS_TO_NOSY``
473  Do the recipients (To:, Cc:) of a message get placed on the nosy list?
474  If 'new' is used, then the recipients will only be added when a message
475  creates a new issue. If 'yes', then the recipients will be added on
476  followups too. If 'no', they're never added to the nosy.
479 Nosy List
480 ~~~~~~~~~
482 Roundup watches for additions to the "messages" property of items.
484 When a new message is added, it is sent to all the users on the "nosy"
485 list for the item that are not already on the "recipients" list of the
486 message. Those users are then appended to the "recipients" property on
487 the message, so multiple copies of a message are never sent to the same
488 user. The journal recorded by the hyperdatabase on the "recipients"
489 property then provides a log of when the message was sent to whom.
491 If the author of the message is also in the nosy list for the item that
492 the message is attached to, then the config var ``MESSAGES_TO_AUTHOR``
493 is queried to determine if they get a nosy list copy of the message too.
496 Mail gateway script command line
497 --------------------------------
499 Usage::
501   roundup-mailgw [[-C class] -S field=value]* <instance home> [method]
503 The roundup mail gateway may be called in one of three ways:
505  - with an instance home as the only argument,
506  - with both an instance home and a mail spool file, or
507  - with both an instance home and a pop server account.
508  
509 It also supports optional -C and -S arguments that allows you to set a
510 fields for a class created by the roundup-mailgw. The default class if
511 not specified is msg, but the other classes: issue, file, user can also
512 be used. The -S or --set options uses the same
513 property=value[;property=value] notation accepted by the command line
514 roundup command or the commands that can be given on the Subject line of
515 an email message.
517 It can let you set the type of the message on a per email address basis.
519 PIPE:
520  In the first case, the mail gateway reads a single message from the
521  standard input and submits the message to the roundup.mailgw module.
523 UNIX mailbox:
524  In the second case, the gateway reads all messages from the mail spool
525  file and submits each in turn to the roundup.mailgw module. The file is
526  emptied once all messages have been successfully handled. The file is
527  specified as::
529    mailbox /path/to/mailbox
531 POP:
532  In the third case, the gateway reads all messages from the POP server
533  specified and submits each in turn to the roundup.mailgw module. The
534  server is specified as::
536     pop username:password@server
538  The username and password may be omitted::
540     pop username@server
541     pop server
543  are both valid. The username and/or password will be prompted for if
544  not supplied on the command-line.
546 APOP:
547  Same as POP, but using Authenticated POP::
549     apop username:password@server
552 Command Line Tool
553 =================
555 The basic usage is::
557  Usage: roundup-admin [options] [<command> <arguments>]
559  Options:
560   -i instance home  -- specify the issue tracker "home directory" to administer
561   -u                -- the user[:password] to use for commands
562   -d                -- print full designators not just class id numbers
563   -c                -- when outputting lists of data, comma-separate them.
564                Same as '-S ","'.
565   -S <string>       -- when outputting lists of data, string-separate them
566   -s                -- when outputting lists of data, space-separate them.
567                Same as '-S " "'.
569   Only one of -s, -c or -S can be specified.
571  Help:
572   roundup-admin -h
573   roundup-admin help                       -- this help
574   roundup-admin help <command>             -- command-specific help
575   roundup-admin help all                   -- all available help
577  Commands: 
578   commit
579   create classname property=value ...
580   display designator[,designator]*
581   export [class[,class]] export_dir
582   find classname propname=value ...
583   get property designator[,designator]*
584   help topic
585   history designator
586   import import_dir
587   initialise [adminpw]
588   install [template [backend [admin password]]]
589   list classname [property]
590   pack period | date
591   reindex
592   retire designator[,designator]*
593   rollback
594   security [Role name]
595   set items property=value property=value ...
596   specification classname
597   table classname [property[,property]*]
598  Commands may be abbreviated as long as the abbreviation matches only one
599  command, e.g. l == li == lis == list.
602 All commands (except help) require a tracker specifier. This is just the
603 path to the roundup tracker you're working with. A roundup tracker is
604 where roundup keeps the database and configuration file that defines an
605 issue tracker. It may be thought of as the issue tracker's "home
606 directory". It may be specified in the environment variable
607 ``TRACKER_HOME`` or on the command line as "``-i tracker``".
609 A designator is a classname and an itemid concatenated, eg. bug1,
610 user10, ... Property values are represented as strings in command
611 arguments and in the printed results:
613 - Strings are, well, strings.
614 - Password values will display as their encoded value.
615 - Date values are printed in the full date format in the local time
616   zone, and accepted in the full format or any of the partial formats
617   explained below.::
618   
619     Input of...        Means...
620     "2000-04-17.03:45" 2000-04-17.03:45:00
621     "2000-04-17"       2000-04-17.00:00:00
622     "01-25"            yyyy-01-25.00:00:00
623     "08-13.22:13"      yyyy-08-13.22:13:00
624     "11-07.09:32:43"   yyyy-11-07.09:32:43
625     "14:25"            yyyy-mm-dd.14:25:00
626     "8:47:11"          yyyy-mm-dd.08:47:11
627     "2003"             2003-01-01.00:00:00
628     "2003-04"          2003-04-01.00:00:00
629     "."                "right now"
630     
631 - Link values are printed as item designators. When given as an
632   argument, item designators and key strings are both accepted.
633 - Multilink values are printed as lists of item designators joined by
634   commas. When given as an argument, item designators and key strings
635   are both accepted; an empty string, a single item, or a list of items
636   joined by commas is accepted.
637   
638 When multiple items are specified to the roundup get or roundup set
639 commands, the specified properties are retrieved or set on all the
640 listed items.  When multiple results are returned by the roundup get or
641 roundup find commands, they are printed one per line (default) or joined
642 by commas (with the "``-c``" option).
644 Where the command changes data, a login name/password is required. The
645 login may be specified as either "``name``" or "``name:password``".
647 - ``ROUNDUP_LOGIN`` environment variable
648 - the "``-u``" command-line option
650 If either the name or password is not supplied, they are obtained from
651 the command-line.
654 Using with the shell
655 --------------------
657 With version 0.6.0 or newer of roundup which supports: multiple
658 designators to display and the -d, -S and -s flags.
660 To find all messages regarding chatting issues that contain the word
661 "spam", for example, you could execute the following command from the
662 directory where the database dumps its files::
664     shell% for issue in `roundup-admin -ds find issue status=chatting`; do
665     > grep -l spam `roundup-admin -ds ' ' get messages $issue`
666     > done
667     msg23
668     msg49
669     msg50
670     msg61
671     shell%
673 Or, using the -dc option, this can be written as a single command::
675     shell% grep -l spam `roundup get messages \
676         \`roundup -dc find issue status=chatting\``
677     msg23
678     msg49
679     msg50
680     msg61
681     shell%
683 You can also display issue contents::
685     shell% roundup-admin display `roundup-admin -dc get messages \
686                issue3,issue1`
687     files: []
688     inreplyto: None
689     recipients: []
690     author: 1
691     date: 2003-02-16.21:23:03
692     messageid: None
693     summary: jkdskldjf
694     files: []
695     inreplyto: None
696     recipients: []
697     author: 1
698     date: 2003-02-15.01:59:11
699     messageid: None
700     summary: jlkfjadsf    
701     
702 or status::
704     shell% roundup-admin get name `/tools/roundup/bin/roundup-admin \
705           -dc -i /var/roundup/sysadmin get status issue3,issue1`
706     unread
707     deferred
709 or status on a single line::
711     shell% echo `roundup-admin get name \`/tools/roundup/bin/roundup-admin \
712              -dc -i /var/roundup/sysadmin get status issue3,issue1\``
713     unread deferred
715 which is the same as::
717     shell% roundup-admin -s get name `/tools/roundup/bin/roundup-admin \
718              -dc -i /var/roundup/sysadmin get status issue3,issue1`
719     unread deferred
721 Also the tautological::
723    shell% roundup-admin get name \
724       `roundup-admin -dc get status \`roundup-admin -dc find issue \
725           status=chatting\``
726    chatting
727    chatting
729 Remember the roundup commands that accept multiple designators accept
730 them ',' separated so using '-dc' is almost always required.
732 -----------------
734 Back to `Table of Contents`_
736 .. _`Table of Contents`: index.html
737 .. _`customisation documentation`: customizing.html