Code

1c1cc3a00f4050695bf209c489a2384c3c009772
[roundup.git] / doc / user_guide.txt
1 ==========
2 User Guide
3 ==========
5 :Version: $Revision: 1.3 $
7 .. contents::
9 Command Line Tool
10 -----------------
12 Usage: ``roundup-admin [-i instance home] [-u login] [-c] <command> <arguments>``
14 Options:
16 -i          instance home specify the issue tracker "home directory" to administer
17 -u          the ``user[:password]`` to use for commands
18 -c          when outputting lists of data, comma-separate them
20 +-----------------------------------------------------------------------------+
21 | Command Help                                                                |
22 +=============+===============================================================+
23 |commit       |Usage: commit                                                  |
24 |             |The changes made during an interactive session are not         |
25 |             |automatically written to the database - they must be committed |
26 |             |using this command.                                            |
27 |             |                                                               |
28 |             |One-off commands on the command-line are automatically         |
29 |             |committed if they are successful.                              |
30 +-------------+---------------------------------------------------------------+
31 |create       |Usage: create classname property=value ...                     |
32 |             |This creates a new entry of the given class using the property |
33 |             |name=value arguments provided on the command line after the    |
34 |             |"create" command.                                              |
35 +-------------+---------------------------------------------------------------+
36 |display      |Usage: display designator                                      |
37 |             |This lists the properties and their associated values for the  |
38 |             |given node.                                                    |
39 +-------------+---------------------------------------------------------------+
40 |export       |Usage: export class[,class] destination dir                    |
41 |             |This action exports the current data from the database into    |
42 |             |tab-separated-value files that are placed in the nominated     |
43 |             |destination                                                    |
44 |             |directory. The journals are not exported.                      |
45 +-------------+---------------------------------------------------------------+
46 |find         |Usage: find classname propname=value ...                       |
47 |             |Find the nodes of the given class with a given link property   |
48 |             |value. The                                                     |
49 |             |value may be either the nodeid of the linked node, or its key  |
50 |             |value.                                                         |
51 +-------------+---------------------------------------------------------------+
52 |get          |Usage: get property designator[,designator]*                   |
53 |             |Retrieves the property value of the nodes specified by the     |
54 |             |designators.                                                   |
55 +-------------+---------------------------------------------------------------+
56 |help         |Usage: help topic                                              |
57 |             |commands  -- list commands                                     |
58 |             |x -- help specific to a command                                |
59 |             |initopts  -- init command options                              |
60 |             |all       -- all available help                                |
61 +-------------+---------------------------------------------------------------+
62 |history      |Usage: history designator                                      |
63 |             |Lists the journal entries for the node identified by the       |
64 |             |designator.                                                    |
65 +-------------+---------------------------------------------------------------+
66 |import       |Usage: import class file                                       |
67 |             |The file must define the same properties as the class          |
68 |             |(including having                                              |
69 |             |a "header" line with those property names.) The new nodes are  |
70 |             |added to                                                       |
71 |             |the existing database - if you want to create a new database   |
72 |             |using the                                                      |
73 |             |imported data, then create a new database (or, tediously,      |
74 |             |retire all                                                     |
75 |             |the old data.)                                                 |
76 +-------------+---------------------------------------------------------------+
77 |initialise   |Usage: initialise [template [backend [admin password]]]        |
78 |             |The command will prompt for the instance home directory (if not|
79 |             |supplied                                                       |
80 |             |through INSTANCE HOME or the -i option. The template, backend  |
81 |             |and admin                                                      |
82 |             |password may be specified on the command-line as arguments, in |
83 |             |that                                                           |
84 |             |order.                                                         |
85 |             |                                                               |
86 |             |See also initopts help.                                        |
87 +-------------+---------------------------------------------------------------+
88 |list         |Usage: list classname [property]                               |
89 |             |Lists all instances of the given class. If the property is not |
90 |             |specified, the  "label" property is used. The label property is|
91 |             |tried                                                          |
92 |             |in order: the key, "name", "title" and then the first property,|
93 |             |alphabetically.                                                |
94 +-------------+---------------------------------------------------------------+
95 |retire       |Usage: retire designator[,designator]*                         |
96 |             |This action indicates that a particular node is not to be      |
97 |             |retrieved by                                                   |
98 |             |the list or find commands, and its key value may be re-used.   |
99 +-------------+---------------------------------------------------------------+
100 |rollback     |Usage: rollback                                                |
101 |             |The changes made during an interactive session are not         |
102 |             |automatically written to the database - they must be committed |
103 |             |manually. This command undoes all those changes, so a commit   |
104 |             |immediately after would make no changes to the database.       |
105 +-------------+---------------------------------------------------------------+
106 |set          |Usage: set designator[,designator]* propname=value ...         |
107 |             |Sets the property to the value for all designators given.      |
108 +-------------+---------------------------------------------------------------+
109 |specification|Usage: specification classname                                 |
110 |             |This lists the properties for a given class.                   |
111 +-------------+---------------------------------------------------------------+
112 |table        |Usage: table classname [property[,property]*]                  |
113 |             |Lists all instances of the given class. If the properties are  |
114 |             |not                                                            |
115 |             |specified, all properties are displayed. By default, the column|
116 |             |widths                                                         |
117 |             |are the width of the property names. The width may be          |
118 |             |explicitly defined                                             |
119 |             |by defining the property as "name:width". For example::        |
120 |             |                                                               |
121 |             |  roundup> table priority id,name:10                           |
122 |             |  Id Name                                                      |
123 |             |  1  fatal-bug                                                 |
124 |             |  2  bug                                                       |
125 |             |  3  usability                                                 |
126 |             |  4  feature                                                   |
127 +-------------+---------------------------------------------------------------+
130 All commands (except help) require an instance specifier. This is just the path to
131 the roundup instance you're working with. A roundup instance is where roundup
132 keeps the database and configuration file that defines an issue tracker. It may be
133 thought of as the issue tracker's "home directory". It may be specified in the
134 environment variable ``ROUNDUP_INSTANCE`` or on the command line as "``-i instance``".
136 A designator is a classname and a nodeid concatenated, eg. bug1, user10, ...
137 Property values are represented as strings in command arguments and in the printed
138 results:
140 - Strings are, well, strings.
141 - Password values will display as their encoded value.
142 - Date values are printed in the full date format in the local time zone,
143   and accepted in the full format or any of the partial formats explained
144   below.::
145   
146     Input of...        Means...
147     "2000-04-17.03:45" 2000-04-17.08:45:00
148     "2000-04-17"       2000-04-17.00:00:00
149     "01-25"            yyyy-01-25.00:00:00
150     "08-13.22:13"      yyyy-08-14.03:13:00
151     "11-07.09:32:43"   yyyy-11-07.14:32:43
152     "14:25"            yyyy-mm-dd.19:25:00
153     "8:47:11"          yyyy-mm-dd.13:47:11
154     "."                "right now"
155     
156 - Link values are printed as node designators. When given as an argument,
157   node designators and key strings are both accepted.
158 - Multilink values are printed as lists of node designators joined by
159   commas. When given as an argument, node designators and key strings are
160   both accepted; an empty string, a single node, or a list of nodes joined
161   by commas is accepted.
162   
163 When multiple nodes are specified to the roundup get or roundup set commands, the
164 specified properties are retrieved or set on all the listed nodes.  When multiple
165 results are returned by the roundup get or roundup find commands, they are printed
166 one per line (default) or joined by commas (with the "``-c``" option).
168 Where the command changes data, a login name/password is required. The login may
169 be specified as either "``name``" or "``name:password``".
171 - ``ROUNDUP_LOGIN`` environment variable
172 - the "``-u``" command-line option
174 If either the name or password is not supplied, they are obtained from the
175 command-line.
178 Web Interface
179 -------------
181 Index views may be modified by the following arguments:
183 +-----------+--------------------------------------------------------------+
184 | :sort     | sort by prop name, optionally preceeded with '-'             |
185 |           | to give descending or nothing for ascending sorting.         |
186 +-----------+--------------------------------------------------------------+
187 | :group    | group by prop name, optionally preceeded with '-' or         |
188 |           | to sort in descending or nothing for ascending order.        |
189 +-----------+--------------------------------------------------------------+
190 | :filter   | selects which props should be displayed in the filter        |
191 |           | section. Default is all.                                     |
192 +-----------+--------------------------------------------------------------+
193 | :columns  | selects the columns that should be displayed.                |
194 |           | Default is all.                                              |
195 +-----------+--------------------------------------------------------------+
196 | propname  | selects the values the node properties given by propname     |
197 |           | must have (very basic search/filter).                        |
198 +-----------+--------------------------------------------------------------+
200 Not sure what to put in here...
202 E-Mail Gateway
203 --------------
205 Performing Actions
206 ~~~~~~~~~~~~~~~~~~
208 The subject line of the incoming message is examined to determine whether the
209 message is an attempt to create a new item or to discuss an existing item. A
210 designator enclosed in square brackets is sought as the first thing on the
211 subject line (after skipping any "Fwd:" or "Re:" prefixes).
212 If an item designator (class name and id number) is found there, the newly
213 created "msg" node is added to the "messages" property for that item, and any
214 new "file" nodes are added to the "files" property for the item.
215 If just an item class name is found there, we attempt to create a new item of
216 that class with its "messages" property initialized to contain the new "msg"
217 node and its "files" property initialized to contain any new "file" nodes.
219 Setting Properties
220 ~~~~~~~~~~~~~~~~~~
222 The e-mail interface also provides a simple way to set properties on items. At
223 the end of the subject line, propname=value pairs can be specified in square
224 brackets, using the same conventions as for the roundup set shell command.
225 explanatory message given in the exception.
227 Message content
228 ~~~~~~~~~~~~~~~
230 Incoming messages are examined for multiple parts:
232 * In a multipart/mixed message or part, each subpart is extracted and
233   examined. The text/plain subparts are assembled to form the textual body
234   of the message, to be stored in the file associated with a "msg" class
235   node. Any parts of other types are each stored in separate files and
236   given "file" class nodes that are linked to the "msg" node.
237 * In a multipart/alternative message or part, we look for a text/plain
238   subpart and ignore the other parts.
240 Message summary
241 :::::::::::::::
243 The "summary" property on message nodes is taken from the first non-quoting
244 section in the message body. The message body is divided into sections by blank
245 lines. Sections where the second and all subsequent lines begin with a ">" or
246 "|" character are considered "quoting sections". The first line of the first
247 non-quoting section becomes the summary of the message.
249 Address handling
250 ~~~~~~~~~~~~~~~~
252 All of the addresses in the To: and Cc: headers of the incoming message are
253 looked up among the user nodes, and the corresponding users are placed in the
254 "recipients" property on the new "msg" node. The address in the From: header
255 similarly determines the "author" property of the new "msg" node. The default
256 handling for addresses that don't have corresponding users is to create new
257 users with no passwords and a username equal to the address. (The web interface
258 does not permit logins for users with no passwords.) If we prefer to reject
259 mail from outside sources, we can simply register an auditor on the "user"
260 class that prevents the creation of user nodes with no passwords.
262 Triggers
263 ~~~~~~~~
265 Both cases may trigger detectors (in the first case we are calling the set()
266 method to add the message to the item's spool; in the second case we are
267 calling the create() method to create a new node). If an auditor raises an
268 exception, the original message is bounced back to the sender with the
270 Nosy Lists
271 ::::::::::
273 A standard detector is provided that watches for additions to the "messages"
274 property. When a new message is added, the detector sends it to all the users
275 on the "nosy" list for the item that are not already on the "recipients" list
276 of the message. Those users are then appended to the "recipients" property on
277 the message, so multiple copies of a message are never sent to the same user.
278 The journal recorded by the hyperdatabase on the "recipients" property then
279 provides a log of when the message was sent to whom.
282 -----------------
284 Back to `Table of Contents`_
286 .. _`Table of Contents`: index.html