Code

Fix some tests.
[roundup.git] / doc / upgrading.txt
1 ======================================
2 Upgrading to newer versions of Roundup
3 ======================================
5 Please read each section carefully and edit your tracker home files
6 accordingly. Note that there is information about upgrade procedures in the
7 `administration guide`_.
9 .. contents::
11 Migrating from 0.6 to 0.7
12 =========================
14 0.7.0 Typed columns in MySQL backend
15 ------------------------------------
17 The MySQL (and Postgresql for that matter) backend now creates tables with
18 appropriate column datatypes (not just varchar).
20 Your database will be automatically migrated to use the new schemas, but
21 it will take time. It's probably a good idea to make sure you do this as
22 part of the upgrade when users are not expected to be using the system.
25 0.7.0 Permission setup
26 ----------------------
28 0.7 automatically sets up the Edit and View Permissions for all classes,
29 thus you don't need to do so. Feel free to remove the code::
31     # Add new Permissions for this schema
32     for cl in 'issue', 'file', 'msg', 'user', 'query', 'keyword':
33         db.security.addPermission(name="Edit", klass=cl,
34             description="User is allowed to edit "+cl)
35         db.security.addPermission(name="View", klass=cl,
36             description="User is allowed to access "+cl)
38 from your ``dbinit.py``.
41 0.7.0 Permission assignments
42 ----------------------------
44 Due to a change in the rendering of web widgets, permissions are now
45 checked on Classes where they previously weren't (this is a good thing).
47 You will need to add some additional Permission assignments for your
48 regular users, or some displays will break. After the following in your 
49 tracker's ``dbinit.py``::
51     # Assign the access and edit Permissions for issue, file and message
52     # to regular users now
53     for cl in 'issue', 'file', 'msg', 'query', 'keyword':
54         p = db.security.getPermission('View', cl)
55         db.security.addPermissionToRole('User', p)
56         p = db.security.getPermission('Edit', cl)
57         db.security.addPermissionToRole('User', p)
59 add::
61     for cl in 'priority', 'status':
62         p = db.security.getPermission('View', cl)
63         db.security.addPermissionToRole('User', p)
66 0.7.0 New "actor" property
67 --------------------------
69 Roundup's database has a new per-item property "actor" which reflects the
70 user performing the last "actvitiy". See the classic template for ways to
71 integrate this new property into your interface.
73 The property will be automatically added to your existing database.
76 0.7.0 Extending the cgi interface
77 ---------------------------------
79 Before 0.7.0 adding or extending web actions was done by overriding or adding
80 methods on the Client class. Though this approach still works to provide
81 backwards compatibility, it is recommended you upgrade to the new approach, as
82 described in the `Defining new web actions`__ section of the customization
83 documentation. You might also want to take a look at the `Using an external
84 password validation source`__ example.
86 __ customizing.html#defining-new-web-actions
87 __ customizing.html#using-an-external-password-validation-source
90 0.7.0 Getting the current user id
91 ---------------------------------
93 Removed Database.curuserid attribute. Any code referencing this attribute
94 should be replaced with a call to Database.getuid().
97 0.7.0 Email character set
98 -------------------------
100 The default character set for sending email is UTF-8 (ie. Unicode). If you
101 have users whose email clients can't handle UTF-8 (eg. Eudora) then you
102 will need to edit the new config.py variable ``EMAIL_CHARSET``.
105 0.7.0 ZRoundup changes
106 ----------------------
108 The templates in your tracker's html directory will need updating if you
109 wish to use ZRoundup. If you've not modified those files (or some of them),
110 you may just copy the new versions from the Roundup source in the
111 templates/classic/html directory.
113 If you have modified the html files, then you'll need to manually edit them
114 to change all occurances of special form variables from using the colon ":"
115 special character to the at "@" special character. That is, variables such
116 as::
118   :action :required :template :remove:messages ...
120 should become:
122   @action @required @template @remove@messages ...
124 Note that ``tal:`` statements are unaffected. So are TAL expression type
125 prefixes such as ``python:`` and ``string:``. Please ask on the
126 roundup-users mailing list for help if you're unsure.
129 Migrating from 0.6.x to 0.6.3
130 =============================
132 0.6.3 Configuration
133 -------------------
135 You will need to copy the file::
137   templates/classic/detectors/__init__.py
139 to your tracker's ``detectors`` directory, replacing the one already there.
140 This fixes a couple of bugs in that file.
144 Migrating from 0.5 to 0.6
145 =========================
148 0.6.0 Configuration
149 -------------------
151 Introduced EMAIL_FROM_TAG config variable. This value is inserted into
152 the From: line of nosy email. If the sending user is "Foo Bar", the
153 From: line is usually::
155      "Foo Bar" <issue_tracker@tracker.example>
157 the EMAIL_FROM_TAG goes inside the "Foo Bar" quotes like so::
159      "Foo Bar EMAIL_FROM_TAG" <issue_tracker@tracker.example>
161 I've altered the mechanism in the detectors __init__.py module so that it
162 doesn't cross-import detectors from other trackers (if you run more than one
163 in a single roundup-server). This change means that you'll need to copy the
164 __init__.py from roundup/templates/classic/detectors/__init__.py to your
165 <tracker home>/detectors/__init__.py. Don't worry, the "classic" __init__ is a
166 one-size-fits-all, so it'll work even if you've added/removed detectors.
168 0.6.0 Templating changes
169 ------------------------
171 The ``user.item`` template (in the tracker home "templates" directory)
172 needs to have the following hidden variable added to its form (between the
173 ``<form...>`` and ``</form>`` tags::
175   <input type="hidden" name=":template" value="item">
178 0.6.0 Form handling changes
179 ---------------------------
181 Roundup's form handling capabilities have been significantly expanded. This
182 should not affect users of 0.5 installations - but if you find you're
183 getting errors from form submissions, please ask for help on the Roundup
184 users mailing list:
186   http://lists.sourceforge.net/lists/listinfo/roundup-users
188 See the customisation doc section on `Form Values`__ for documentation of the
189 new form variables possible.
191 __ customizing.html#form-values
194 0.6.0 Multilingual character set support
195 ----------------------------------------
197 Added internationalization support. This is done via encoding all data
198 stored in roundup database to utf-8 (unicode encoding). To support utf-8 in
199 web interface you should add the folowing line to your tracker's html/page
200 and html/_generic.help files inside <head> tag::
201   
202     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
204 Since latin characters in utf-8 have the same codes as in ASCII table, this
205 modification is optional for users who use only plain latin characters. 
207 After this modification, you will be able to see and enter any world
208 character via web interface. Data received via mail interface also converted
209 to utf-8, however only new messages will be converted. If your roundup
210 database contains some of non-ASCII characters in one of 8-bit encoding,
211 they will not be visible in new unicode environment. Some of such data (e.g.
212 user names, keywords, etc)  can be edited by administrator, the others
213 (e.g. messages' contents) is not editable via web interface. Currently there
214 is no tool for converting such data, the only solution is to close
215 appropriate old issues and create new ones with the same content.
218 0.6.0 User timezone support
219 ---------------------------
221 From version 0.6.0 roundup supports displaying of Date data in user' local
222 timezone if he/she has provided timezone information. To make it possible
223 some modification to tracker's schema and HTML templates are required.
224 First you must add string property 'timezone' to user class in dbinit.py
225 like this::
226   
227     user = Class(db, "user", 
228                     username=String(),   password=Password(),
229                     address=String(),    realname=String(), 
230                     phone=String(),      organisation=String(),
231                     alternate_addresses=String(),
232                     queries=Multilink('query'), roles=String(),
233                     timezone=String())
234   
235 And second - html interface. Add following lines to
236 $TRACKER_HOME/html/user.item template::
237   
238      <tr>
239       <th>Timezone</th>
240       <td tal:content="structure context/timezone/field">timezone</td>
241      </tr>
243 After that all users should be able to provide their timezone information.
244 Timezone should be a positive or negative integer - offset from GMT.
246 After providing timezone, roundup will show all dates values, found in web
247 and mail interfaces in local time. It will also accept any Date info in
248 local time, convert and store it in GMT.
251 0.6.0 Search page structure
252 ---------------------------
254 In order to accomodate query editing the search page has been restructured. If
255 you want to provide your users with query editing, you should update your
256 search page using the macros detailed in the customisation doc section
257 `Searching on categories`__.
259 __ customizing.html#searching-on-categories
261 Also, the url field in the query class no longer starts with a '?'. You'll need
262 to remove this question mark from the url field to support queries. There's
263 a script in the "tools" directory called ``migrate-queries.py`` that should
264 automatically change any existing queries for you. As always, make a backup
265 of your database before running such a script.
268 0.6.0 Notes for metakit backend users
269 -------------------------------------
271 Roundup 0.6.0 introduced searching on ranges of dates and intervals. To
272 support it, some modifications to interval storing routine were made. So if
273 your tracker uses metakit backend and your db schema contains intervals
274 property, searches on that property will not be accurate for db items that
275 was stored before roundup' upgrade. However all new records should be
276 searchable on intervals.
278 It is possible to convert your database to new format: you can export and
279 import back all your data (consult "Migrating backends" in "Maintenance"
280 documentation). After this operation all your interval properties should
281 become searchable.
283 Users of backends others than metakit should not worry about this issue.
286 Migrating from 0.4.x to 0.5.0
287 =============================
289 This has been a fairly major revision of Roundup:
291 1. Brand new, much more powerful, flexible, tasty and nutritious templating.
292    Unfortunately, this means all your current templates are useless. Hopefully
293    the new documentation and examples will be enough to help you make the
294    transition. Please don't hesitate to ask on roundup-users for help (or
295    complete conversions if you're completely stuck)!
296 2. The database backed got a lot more flexible, allowing Metakit and SQL
297    databases! The only decent SQL database implemented at present is sqlite,
298    but others shouldn't be a whole lot more work.
299 3. A brand new, highly flexible and much more robust security system including
300    a system of Permissions, Roles and Role assignments to users. You may now
301    define your own Permissions that may be checked in CGI transactions.
302 4. Journalling has been made less storage-hungry, so has been turned on
303    by default *except* for author, recipient and nosy link/unlink events. You
304    are advised to turn it off in your trackers too.
305 5. We've changed the terminology from "instance" to "tracker", to ease the
306    learning curve/impact for new users.
307 6. Because of the above changes, the tracker configuration has seen some
308    major changes. See below for the details.
310 Please, **back up your database** before you start the migration process. This
311 is as simple as copying the "db" directory and all its contents from your
312 tracker to somewhere safe.
315 0.5.0 Configuration
316 -------------------
318 First up, rename your ``instance_config.py`` file to just ``config.py``.
320 Then edit your tracker's ``__init__.py`` module. It'll currently look
321 like this::
323  from instance_config import *
324  try:
325      from dbinit import *
326  except ImportError:
327      pass # in installdir (probably :)
328  from interfaces import *
330 and it needs to be::
332  import config
333  from dbinit import open, init
334  from interfaces import Client, MailGW
336 Due to the new templating having a top-level ``page`` that defines links for
337 searching, indexes, adding items etc, the following variables are no longer
338 used:
340 - HEADER_INDEX_LINKS
341 - HEADER_ADD_LINKS
342 - HEADER_SEARCH_LINKS
343 - SEARCH_FILTERS
344 - DEFAULT_INDEX
345 - UNASSIGNED_INDEX
346 - USER_INDEX
347 - ISSUE_FILTER
349 The new security implementation will require additions to the dbinit module,
350 but also removes the need for the following tracker config variables:
352 - ANONYMOUS_ACCESS
353 - ANONYMOUS_REGISTER
355 but requires two new variables which define the Roles assigned to users who
356 register through the web and e-mail interfaces:
358 - NEW_WEB_USER_ROLES
359 - NEW_EMAIL_USER_ROLES
361 in both cases, 'User' is a good initial setting. To emulate
362 ``ANONYMOUS_ACCESS='deny'``, remove all "View" Permissions from the
363 "Anonymous" Role. To emulate ``ANONYMOUS_REGISTER='deny'``, remove the "Web
364 Registration" and/or the "Email Registration" Permission from the "Anonymous"
365 Role. See the section on customising security in the `customisation
366 documentation`_ for more information.
368 Finally, the following config variables have been renamed to make more sense:
370 - INSTANCE_HOME -> TRACKER_HOME
371 - INSTANCE_NAME -> TRACKER_NAME
372 - ISSUE_TRACKER_WEB -> TRACKER_WEB
373 - ISSUE_TRACKER_EMAIL -> TRACKER_EMAIL
376 0.5.0 Schema Specification
377 --------------------------
379 0.5.0 Database backend changes
380 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
382 Your select_db module in your tracker has changed a fair bit. Where it used
383 to contain::
385  # WARNING: DO NOT EDIT THIS FILE!!!
386  from roundup.backends.back_anydbm import Database
388 it must now contain::
390  # WARNING: DO NOT EDIT THIS FILE!!!
391  from roundup.backends.back_anydbm import Database, Class, FileClass, IssueClass
393 Yes, I realise the irony of the "DO NOT EDIT THIS FILE" statement :)
394 Note the addition of the Class, FileClass, IssueClass imports. These are very
395 important, as they're going to make the next change work too. You now need to
396 modify the top of the dbinit module in your tracker from::
398  import instance_config
399  from roundup import roundupdb
400  from select_db import Database
402  from roundup.roundupdb import Class, FileClass
404  class Database(roundupdb.Database, select_db.Database):
405      ''' Creates a hybrid database from:
406           . the selected database back-end from select_db
407           . the roundup extensions from roundupdb
408      '''
409      pass
411  class IssueClass(roundupdb.IssueClass):
412      ''' issues need the email information
413      '''
414      pass
416 to::
418  import config
419  from select_db import Database, Class, FileClass, IssueClass
421 Yes, remove the Database and IssueClass definitions and those other imports.
422 They're not needed any more!
424 Look for places in dbinit.py where ``instance_config`` is used too, and
425 rename them ``config``.
428 0.5.0 Journalling changes
429 ~~~~~~~~~~~~~~~~~~~~~~~~~
431 Journalling has been optimised for storage. Journalling of links has been
432 turned back on by default. If your tracker has a large user base, you may wish
433 to turn off journalling of nosy list, message author and message recipient
434 link and unlink events. You do this by adding ``do_journal='no'`` to the Class
435 initialisation in your dbinit. For example, your *msg* class initialisation
436 probably looks like this::
438     msg = FileClass(db, "msg",
439                     author=Link("user"), recipients=Multilink("user"),
440                     date=Date(),         summary=String(),
441                     files=Multilink("file"),
442                     messageid=String(),  inreplyto=String())
444 to turn off journalling of author and recipient link events, add
445 ``do_journal='no'`` to the ``author=Link("user")`` part of the statement,
446 like so::
448     msg = FileClass(db, "msg",
449                     author=Link("user", do_journal='no'),
450                     recipients=Multilink("user", do_journal='no'),
451                     date=Date(),         summary=String(),
452                     files=Multilink("file"),
453                     messageid=String(),  inreplyto=String())
455 Nosy list link event journalling is actually turned off by default now. If you
456 want to turn it on, change to your issue class' nosy list, change its
457 definition from::
459     issue = IssueClass(db, "issue",
460                     assignedto=Link("user"), topic=Multilink("keyword"),
461                     priority=Link("priority"), status=Link("status"))
463 to::
465     issue = IssueClass(db, "issue", nosy=Multilink("user", do_journal='yes'),
466                     assignedto=Link("user"), topic=Multilink("keyword"),
467                     priority=Link("priority"), status=Link("status"))
469 noting that your definition of the nosy Multilink will override the normal one.
472 0.5.0 User schema changes
473 ~~~~~~~~~~~~~~~~~~~~~~~~~
475 Users have two more properties, "queries" and "roles". You'll have something
476 like this in your dbinit module now::
478     user = Class(db, "user",
479                     username=String(),   password=Password(),
480                     address=String(),    realname=String(),
481                     phone=String(),      organisation=String(),
482                     alternate_addresses=String())
483     user.setkey("username")
485 and you'll need to add the new properties and the new "query" class to it
486 like so::
488     query = Class(db, "query",
489                     klass=String(),     name=String(),
490                     url=String())
491     query.setkey("name")
493     # Note: roles is a comma-separated string of Role names
494     user = Class(db, "user",
495                     username=String(),   password=Password(),
496                     address=String(),    realname=String(),
497                     phone=String(),      organisation=String(),
498                     alternate_addresses=String(),
499                     queries=Multilink('query'), roles=String())
500     user.setkey("username")
502 The "queries" property is used to store off the user's favourite database
503 queries. The "roles" property is explained below in `0.5.0 Security
504 Settings`_.
507 0.5.0 Security Settings
508 ~~~~~~~~~~~~~~~~~~~~~~~
510 See the `security documentation`_ for an explanation of how the new security
511 system works. In a nutshell though, the security is handled as a four step
512 process:
514 1. Permissions are defined as having a name and optionally a hyperdb class
515    they're specific to,
516 2. Roles are defined that have one or more Permissions,
517 3. Users are assigned Roles in their "roles" property, and finally
518 4. Roundup checks that users have appropriate Permissions at appropriate times
519    (like editing issues).
521 Your tracker dbinit module's *open* function now has to define any
522 Permissions that are specific to your tracker, and also the assignment
523 of Permissions to Roles. At the moment, your open function
524 ends with::
526     import detectors
527     detectors.init(db)
529     return db
531 and what we need to do is insert some commands that will set up the security
532 parameters. Right above the ``import detectors`` line, you'll want to insert
533 these lines::
535     #
536     # SECURITY SETTINGS
537     #
538     # new permissions for this schema
539     for cl in 'issue', 'file', 'msg', 'user':
540         db.security.addPermission(name="Edit", klass=cl,
541             description="User is allowed to edit "+cl)
542         db.security.addPermission(name="View", klass=cl,
543             description="User is allowed to access "+cl)
545     # Assign the access and edit permissions for issue, file and message
546     # to regular users now
547     for cl in 'issue', 'file', 'msg':
548         p = db.security.getPermission('View', cl)
549         db.security.addPermissionToRole('User', p)
550         p = db.security.getPermission('Edit', cl)
551         db.security.addPermissionToRole('User', p)
552     # and give the regular users access to the web and email interface
553     p = db.security.getPermission('Web Access')
554     db.security.addPermissionToRole('User', p)
555     p = db.security.getPermission('Email Access')
556     db.security.addPermissionToRole('User', p)
558     # May users view other user information? Comment these lines out
559     # if you don't want them to
560     p = db.security.getPermission('View', 'user')
561     db.security.addPermissionToRole('User', p)
563     # Assign the appropriate permissions to the anonymous user's Anonymous
564     # Role. Choices here are:
565     # - Allow anonymous users to register through the web
566     p = db.security.getPermission('Web Registration')
567     db.security.addPermissionToRole('Anonymous', p)
568     # - Allow anonymous (new) users to register through the email gateway
569     p = db.security.getPermission('Email Registration')
570     db.security.addPermissionToRole('Anonymous', p)
571     # - Allow anonymous users access to the "issue" class of data
572     #   Note: this also grants access to related information like files,
573     #         messages, statuses etc that are linked to issues
574     #p = db.security.getPermission('View', 'issue')
575     #db.security.addPermissionToRole('Anonymous', p)
576     # - Allow anonymous users access to edit the "issue" class of data
577     #   Note: this also grants access to create related information like
578     #         files and messages etc that are linked to issues
579     #p = db.security.getPermission('Edit', 'issue')
580     #db.security.addPermissionToRole('Anonymous', p)
582     # oh, g'wan, let anonymous access the web interface too
583     p = db.security.getPermission('Web Access')
584     db.security.addPermissionToRole('Anonymous', p)
586 Note in the comments there the places where you might change the permissions
587 to restrict users or grant users more access. If you've created additional
588 classes that users should be able to edit and view, then you should add them
589 to the "new permissions for this schema" section at the start of the security
590 block. Then add them to the "Assign the access and edit permissions" section
591 too, so people actually have the new Permission you've created.
593 One final change is needed that finishes off the security system's
594 initialisation. We need to add a call to ``db.post_init()`` at the end of the
595 dbinit open() function. Add it like this::
597     import detectors
598     detectors.init(db)
600     # schema is set up - run any post-initialisation
601     db.post_init()
602     return db
604 You may verify the setup of Permissions and Roles using the new
605 "``roundup-admin security``" command.
608 0.5.0 User changes
609 ~~~~~~~~~~~~~~~~~~
611 To support all those schema changes, you'll need to massage your user database
612 a little too, to:
614 1. make sure there's an "anonymous" user - this user is mandatory now and is
615    the one that unknown users are logged in as.
616 2. make sure all users have at least one Role.
618 If you don't have the "anonymous" user, create it now with the command::
620   roundup-admin create user username=anonymous roles=Anonymous
622 making sure the capitalisation is the same as above. Once you've done that,
623 you'll need to set the roles property on all users to a reasonable default.
624 The admin user should get "Admin", the anonymous user "Anonymous"
625 and all other users "User". The ``fixroles.py`` script in the tools directory
626 will do this. Run it like so (where python is your python 2+ binary)::
628   python tools/fixroles.py -i <tracker home> fixroles
632 0.5.0 CGI interface changes
633 ---------------------------
635 The CGI interface code was completely reorganised and largely rewritten. The
636 end result is that this section of your tracker interfaces module will need
637 changing from::
639  from roundup import cgi_client, mailgw
640  from roundup.i18n import _
641  
642  class Client(cgi_client.Client):
643      ''' derives basic CGI implementation from the standard module,
644          with any specific extensions
645      '''
646      pass
648 to::
650  from roundup import mailgw
651  from roundup.cgi import client
652  
653  class Client(client.Client): 
654      ''' derives basic CGI implementation from the standard module,
655          with any specific extensions
656      '''
657      pass
659 You will also need to install the new version of roundup.cgi from the source
660 cgi-bin directory if you're using it.
663 0.5.0 HTML templating
664 ---------------------
666 You'll want to make a backup of your current tracker html directory. You
667 should then copy the html directory from the Roundup source "classic" template
668 and modify it according to your local schema changes.
670 If you need help with the new templating system, please ask questions on the
671 roundup-users mailing list (available through the roundup project page on
672 sourceforge, http://roundup.sf.net/)
675 0.5.0 Detectors
676 ---------------
678 The nosy reactor has been updated to handle the tracker not having an
679 "assignedto" property on issues. You may want to copy it into your tracker's
680 detectors directory. Chances are you've already fixed it though :)
683 Migrating from 0.4.1 to 0.4.2
684 =============================
686 0.4.2 Configuration
687 -------------------
688 The USER_INDEX definition introduced in 0.4.1 was too restrictive in its
689 allowing replacement of 'assignedto' with the user's userid. Users must change
690 the None value of 'assignedto' to 'CURRENT USER' (the string, in quotes) for
691 the replacement behaviour to occur now.
693 The new configuration variables are:
695 - EMAIL_KEEP_QUOTED_TEXT 
696 - EMAIL_LEAVE_BODY_UNCHANGED
697 - ADD_RECIPIENTS_TO_NOSY
699 See the sample configuration files in::
701  <roundup source>/roundup/templates/classic/instance_config.py
703 and::
705  <roundup source>/roundup/templates/extended/instance_config.py
707 and the `customisation documentation`_ for information on how they're used.
710 0.4.2 Changes to detectors
711 --------------------------
712 You will need to copy the detectors from the distribution into your instance
713 home "detectors" directory. If you used the classic schema, the detectors
714 are in::
716  <roundup source>/roundup/templates/classic/detectors/
718 If you used the extended schema, the detectors are in::
720  <roundup source>/roundup/templates/extended/detectors/
722 The change means that schema-specific code has been removed from the
723 mail gateway and cgi interface and made into auditors:
725 - nosyreactor.py has now got an updatenosy auditor which updates the nosy
726   list with author, recipient and assignedto information.
727 - statusauditor.py makes the unread or resolved -> chatting changes and
728   presets the status of an issue to unread.
730 There's also a bug or two fixed in the nosyreactor code.
732 0.4.2 HTML templating changes
733 -----------------------------
734 The link() htmltemplate function now has a "showid" option for links and
735 multilinks. When true, it only displays the linked item id as the anchor
736 text. The link value is displayed as a tooltip using the title anchor
737 attribute. To use in eg. the superseder field, have something like this::
739    <td>
740     <display call="field('superseder', showid=1)">
741     <display call="classhelp('issue', 'id,title', label='list', width=500)">
742     <property name="superseder">
743      <br>View: <display call="link('superseder', showid=1)">
744     </property>
745    </td>
747 The stylesheets have been cleaned up too. You may want to use the newer
748 versions in::
750  <roundup source>/roundup/templates/<template>/html/default.css
754 Migrating from 0.4.0 to 0.4.1
755 =============================
757 0.4.1 Files storage
758 -------------------
760 Messages and files from newly created issues will be put into subdierectories
761 in thousands e.g. msg123 will be put into files/msg/0/msg123, file2003
762 will go into files/file/2/file2003. Previous messages are still found, but
763 could be put into this structure.
765 0.4.1 Configuration
766 -------------------
768 To allow more fine-grained access control, the variable used to check
769 permission to auto-register users in the mail gateway is now called
770 ANONYMOUS_REGISTER_MAIL rather than overloading ANONYMOUS_REGISTER. If the
771 variable doesn't exist, then ANONYMOUS_REGISTER is tested as before.
773 Configuring the links in the web header is now easier too. The following
774 variables have been added to the classic instance_config.py::
776   HEADER_INDEX_LINKS   - defines the "index" links to be made available
777   HEADER_ADD_LINKS     - defines the "add" links
778   DEFAULT_INDEX        - specifies the index view for DEFAULT
779   UNASSIGNED_INDEX     - specifies the index view for UNASSIGNED
780   USER_INDEX           - specifies the index view for USER
782 See the <roundup source>/roundup/templates/classic/instance_config.py for more
783 information - including how the variables are to be set up. Most users will
784 just be able to copy the variables from the source to their instance home. If
785 you've modified the header by changing the source of the interfaces.py file in
786 the instance home, you'll need to remove that customisation and move it into
787 the appropriate variables in instance_config.py.
789 The extended schema has similar variables added too - see the source for more
790 info.
792 0.4.1 Alternate E-Mail Addresses
793 --------------------------------
795 If you add the property "alternate_addresses" to your user class, your users
796 will be able to register alternate email addresses that they may use to
797 communicate with roundup as. All email from roundup will continue to be sent
798 to their primary address.
800 If you have not edited the dbinit.py file in your instance home directory,
801 you may simply copy the new dbinit.py file from the core code. If you used
802 the classic schema, the interfaces file is in::
804  <roundup source>/roundup/templates/classic/dbinit.py
806 If you used the extended schema, the file is in::
808  <roundup source>/roundup/templates/extended/dbinit.py 
810 If you have modified your dbinit.py file, you need to edit the dbinit.py
811 file in your instance home directory. Find the lines which define the user
812 class::
814     user = Class(db, "msg",
815                     username=String(),   password=Password(),
816                     address=String(),    realname=String(), 
817                     phone=String(),      organisation=String(),
818                     alternate_addresses=String())
820 You will also want to add the property to the user's details page. The
821 template for this is the "user.item" file in your instance home "html"
822 directory. Similar to above, you may copy the file from the roundup source if
823 you haven't modified it. Otherwise, add the following to the template::
825    <display call="multiline('alternate_addresses')">
827 with appropriate labelling etc. See the standard template for an idea.
831 Migrating from 0.3.x to 0.4.0
832 =============================
834 0.4.0 Message-ID and In-Reply-To addition
835 -----------------------------------------
836 0.4.0 adds the tracking of messages by message-id and allows threading
837 using in-reply-to. Most e-mail clients support threading using this
838 feature, and we hope to add support for it to the web gateway. If you
839 have not edited the dbinit.py file in your instance home directory, you may
840 simply copy the new dbinit.py file from the core code. If you used the
841 classic schema, the interfaces file is in::
843  <roundup source>/roundup/templates/classic/dbinit.py
845 If you used the extended schema, the file is in::
847  <roundup source>/roundup/templates/extended/dbinit.py 
849 If you have modified your dbinit.py file, you need to edit the dbinit.py
850 file in your instance home directory. Find the lines which define the msg
851 class::
853     msg = FileClass(db, "msg",
854                     author=Link("user"), recipients=Multilink("user"),
855                     date=Date(),         summary=String(),
856                     files=Multilink("file"))
858 and add the messageid and inreplyto properties like so::
860     msg = FileClass(db, "msg",
861                     author=Link("user"), recipients=Multilink("user"),
862                     date=Date(),         summary=String(),
863                     files=Multilink("file"),
864                     messageid=String(),  inreplyto=String())
866 Also, configuration is being cleaned up. This means that your dbinit.py will
867 also need to be changed in the open function. If you haven't changed your
868 dbinit.py, the above copy will be enough. If you have, you'll need to change
869 the line (round line 50)::
871     db = Database(instance_config.DATABASE, name)
873 to::
875     db = Database(instance_config, name)
878 0.4.0 Configuration
879 --------------------
880 ``TRACKER_NAME`` and ``EMAIL_SIGNATURE_POSITION`` have been added to the
881 instance_config.py. The simplest solution is to copy the default values
882 from template in the core source.
884 The mail gateway now checks ``ANONYMOUS_REGISTER`` to see if unknown users
885 are to be automatically registered with the tracker. If it is set to "deny"
886 then unknown users will not have access. If it is set to "allow" they will be
887 automatically registered with the tracker.
890 0.4.0 CGI script roundup.cgi
891 ----------------------------
892 The CGI script has been updated with some features and a bugfix, so you should
893 copy it from the roundup cgi-bin source directory again. Make sure you update
894 the ROUNDUP_INSTANCE_HOMES after the copy.
897 0.4.0 Nosy reactor
898 ------------------
899 The nosy reactor has also changed - copy the nosyreactor.py file from the core
900 source::
902    <roundup source>/roundup/templates/<template>/detectors/nosyreactor.py
904 to your instance home "detectors" directory.
907 0.4.0 HTML templating
908 ---------------------
909 The field() function was incorrectly implemented - links and multilinks now
910 display as text fields when rendered using field(). To display a menu (drop-
911 down or select box) you need to use the menu() function.
915 Migrating from 0.2.x to 0.3.x
916 =============================
918 0.3.x Cookie Authentication changes
919 -----------------------------------
920 0.3.0 introduces cookie authentication - you will need to copy the
921 interfaces.py file from the roundup source to your instance home to enable
922 authentication. If you used the classic schema, the interfaces file is in::
924  <roundup source>/roundup/templates/classic/interfaces.py
926 If you used the extended schema, the file is in::
928  <roundup source>/roundup/templates/extended/interfaces.py
930 If you have modified your interfaces.Client class, you will need to take
931 note of the login/logout functionality provided in roundup.cgi_client.Client
932 (classic schema) or roundup.cgi_client.ExtendedClient (extended schema) and
933 modify your instance code apropriately.
936 0.3.x Password encoding
937 -----------------------
938 This release also introduces encoding of passwords in the database. If you
939 have not edited the dbinit.py file in your instance home directory, you may
940 simply copy the new dbinit.py file from the core code. If you used the
941 classic schema, the interfaces file is in::
943  <roundup source>/roundup/templates/classic/dbinit.py
945 If you used the extended schema, the file is in::
947  <roundup source>/roundup/templates/extended/dbinit.py
950 If you have modified your dbinit.py file, you may use encoded passwords:
952 1. Edit the dbinit.py file in your instance home directory
953    a. At the first code line of the open() function::
955        from roundup.hyperdb import String, Date, Link, Multilink
957       alter to include Password, as so::
959        from roundup.hyperdb import String, Password, Date, Link, Multilink
961    b. Where the password property is defined (around line 66)::
963        user = Class(db, "user", 
964                        username=String(),   password=String(),
965                        address=String(),    realname=String(), 
966                        phone=String(),      organisation=String())
967        user.setkey("username")
969       alter the "password=String()" to "password=Password()"::
971        user = Class(db, "user", 
972                        username=String(),   password=Password(),
973                        address=String(),    realname=String(), 
974                        phone=String(),      organisation=String())
975        user.setkey("username")
977 2. Any existing passwords in the database will remain cleartext until they
978    are edited. It is recommended that at a minimum the admin password be
979    changed immediately::
981       roundup-admin -i <instance home> set user1 password=<new password>
984 0.3.x Configuration
985 -------------------
986 FILTER_POSITION, ANONYMOUS_ACCESS, ANONYMOUS_REGISTER have been added to
987 the instance_config.py. Simplest solution is to copy the default values from
988 template in the core source.
990 MESSAGES_TO_AUTHOR has been added to the IssueClass in dbinit.py. Set to 'yes'
991 to send nosy messages to the author. Default behaviour is to not send nosy
992 messages to the author. You will need to add MESSAGES_TO_AUTHOR to your
993 dbinit.py in your instance home.
996 0.3.x CGI script roundup.cgi
997 ----------------------------
998 There have been some structural changes to the roundup.cgi script - you will
999 need to install it again from the cgi-bin directory of the source
1000 distribution. Make sure you update the ROUNDUP_INSTANCE_HOMES after the
1001 copy.
1004 .. _`customisation documentation`: customizing.html
1005 .. _`security documentation`: security.html
1006 .. _`administration guide`: admin.html