Code

Update documentation for the client.py split and add an upgrade notice.
[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 Extending the cgi interface
15 ---------------------------------
17 Before 0.7.0 adding or extending web actions was done by overriding or adding
18 methods on the Client class. Though this approach still works to provide
19 backwards compatibility, it is recommended you upgrade to the new approach, as
20 described in the `Defining new web actions`__ section of the customization
21 documentation.
23 __  customizing.html#defining-new-web-actions
25 0.7.0 Getting the current user id
26 ---------------------------------
28 Removed Database.curuserid attribute. Any code referencing this attribute
29 should be replaced with a call to Database.getuid().
32 0.7.0 ZRoundup changes
33 ----------------------
35 The templates in your tracker's html directory will need updating if you
36 wish to use ZRoundup. If you've not modified those files (or some of them),
37 you may just copy the new versions from the Roundup source in the
38 templates/classic/html directory.
40 If you have modified the html files, then you'll need to manually edit them
41 to change all occurances of special form variables from using the colon ":"
42 special character to the at "@" special character. That is, variables such
43 as::
45   :action :required :template :remove:messages ...
47 should become:
49   @action @required @template @remove@messages ...
51 Note that ``tal:`` statements are unaffected. So are TAL expression type
52 prefixes such as ``python:`` and ``string:``. Please ask on the
53 roundup-users mailing list for help if you're unsure.
56 Migrating from 0.6.x to 0.6.3
57 =============================
59 0.6.3 Configuration
60 -------------------
62 You will need to copy the file::
64   templates/classic/detectors/__init__.py
66 to your tracker's ``detectors`` directory, replacing the one already there.
67 This fixes a couple of bugs in that file.
71 Migrating from 0.5 to 0.6
72 =========================
75 0.6.0 Configuration
76 -------------------
78 Introduced EMAIL_FROM_TAG config variable. This value is inserted into
79 the From: line of nosy email. If the sending user is "Foo Bar", the
80 From: line is usually::
82      "Foo Bar" <issue_tracker@tracker.example>
84 the EMAIL_FROM_TAG goes inside the "Foo Bar" quotes like so::
86      "Foo Bar EMAIL_FROM_TAG" <issue_tracker@tracker.example>
88 I've altered the mechanism in the detectors __init__.py module so that it
89 doesn't cross-import detectors from other trackers (if you run more than one
90 in a single roundup-server). This change means that you'll need to copy the
91 __init__.py from roundup/templates/classic/detectors/__init__.py to your
92 <tracker home>/detectors/__init__.py. Don't worry, the "classic" __init__ is a
93 one-size-fits-all, so it'll work even if you've added/removed detectors.
95 0.6.0 Templating changes
96 ------------------------
98 The ``user.item`` template (in the tracker home "templates" directory)
99 needs to have the following hidden variable added to its form (between the
100 ``<form...>`` and ``</form>`` tags::
102   <input type="hidden" name=":template" value="item">
105 0.6.0 Form handling changes
106 ---------------------------
108 Roundup's form handling capabilities have been significantly expanded. This
109 should not affect users of 0.5 installations - but if you find you're
110 getting errors from form submissions, please ask for help on the Roundup
111 users mailing list:
113   http://lists.sourceforge.net/lists/listinfo/roundup-users
115 See the customisation doc section on `Form Values`__ for documentation of the
116 new form variables possible.
118 __ customizing.html#form-values
121 0.6.0 Multilingual character set support
122 ----------------------------------------
124 Added internationalization support. This is done via encoding all data
125 stored in roundup database to utf-8 (unicode encoding). To support utf-8 in
126 web interface you should add the folowing line to your tracker's html/page
127 and html/_generic.help files inside <head> tag::
128   
129     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
131 Since latin characters in utf-8 have the same codes as in ASCII table, this
132 modification is optional for users who use only plain latin characters. 
134 After this modification, you will be able to see and enter any world
135 character via web interface. Data received via mail interface also converted
136 to utf-8, however only new messages will be converted. If your roundup
137 database contains some of non-ASCII characters in one of 8-bit encoding,
138 they will not be visible in new unicode environment. Some of such data (e.g.
139 user names, keywords, etc)  can be edited by administrator, the others
140 (e.g. messages' contents) is not editable via web interface. Currently there
141 is no tool for converting such data, the only solution is to close
142 appropriate old issues and create new ones with the same content.
145 0.6.0 User timezone support
146 ---------------------------
148 From version 0.6.0 roundup supports displaying of Date data in user' local
149 timezone if he/she has provided timezone information. To make it possible
150 some modification to tracker's schema and HTML templates are required.
151 First you must add string property 'timezone' to user class in dbinit.py
152 like this::
153   
154     user = Class(db, "user", 
155                     username=String(),   password=Password(),
156                     address=String(),    realname=String(), 
157                     phone=String(),      organisation=String(),
158                     alternate_addresses=String(),
159                     queries=Multilink('query'), roles=String(),
160                     timezone=String())
161   
162 And second - html interface. Add following lines to
163 $TRACKER_HOME/html/user.item template::
164   
165      <tr>
166       <th>Timezone</th>
167       <td tal:content="structure context/timezone/field">timezone</td>
168      </tr>
170 After that all users should be able to provide their timezone information.
171 Timezone should be a positive or negative integer - offset from GMT.
173 After providing timezone, roundup will show all dates values, found in web
174 and mail interfaces in local time. It will also accept any Date info in
175 local time, convert and store it in GMT.
178 0.6.0 Search page structure
179 ---------------------------
181 In order to accomodate query editing the search page has been restructured. If
182 you want to provide your users with query editing, you should update your
183 search page using the macros detailed in the customisation doc section
184 `Searching on categories`__.
186 __ customizing.html#searching-on-categories
188 Also, the url field in the query class no longer starts with a '?'. You'll need
189 to remove this question mark from the url field to support queries. There's
190 a script in the "tools" directory called ``migrate-queries.py`` that should
191 automatically change any existing queries for you. As always, make a backup
192 of your database before running such a script.
195 0.6.0 Notes for metakit backend users
196 -------------------------------------
198 Roundup 0.6.0 introduced searching on ranges of dates and intervals. To
199 support it, some modifications to interval storing routine were made. So if
200 your tracker uses metakit backend and your db schema contains intervals
201 property, searches on that property will not be accurate for db items that
202 was stored before roundup' upgrade. However all new records should be
203 searchable on intervals.
205 It is possible to convert your database to new format: you can export and
206 import back all your data (consult "Migrating backends" in "Maintenance"
207 documentation). After this operation all your interval properties should
208 become searchable.
210 Users of backends others than metakit should not worry about this issue.
213 Migrating from 0.4.x to 0.5.0
214 =============================
216 This has been a fairly major revision of Roundup:
218 1. Brand new, much more powerful, flexible, tasty and nutritious templating.
219    Unfortunately, this means all your current templates are useless. Hopefully
220    the new documentation and examples will be enough to help you make the
221    transition. Please don't hesitate to ask on roundup-users for help (or
222    complete conversions if you're completely stuck)!
223 2. The database backed got a lot more flexible, allowing Metakit and SQL
224    databases! The only decent SQL database implemented at present is sqlite,
225    but others shouldn't be a whole lot more work.
226 3. A brand new, highly flexible and much more robust security system including
227    a system of Permissions, Roles and Role assignments to users. You may now
228    define your own Permissions that may be checked in CGI transactions.
229 4. Journalling has been made less storage-hungry, so has been turned on
230    by default *except* for author, recipient and nosy link/unlink events. You
231    are advised to turn it off in your trackers too.
232 5. We've changed the terminology from "instance" to "tracker", to ease the
233    learning curve/impact for new users.
234 6. Because of the above changes, the tracker configuration has seen some
235    major changes. See below for the details.
237 Please, **back up your database** before you start the migration process. This
238 is as simple as copying the "db" directory and all its contents from your
239 tracker to somewhere safe.
242 0.5.0 Configuration
243 -------------------
245 First up, rename your ``instance_config.py`` file to just ``config.py``.
247 Then edit your tracker's ``__init__.py`` module. It'll currently look
248 like this::
250  from instance_config import *
251  try:
252      from dbinit import *
253  except ImportError:
254      pass # in installdir (probably :)
255  from interfaces import *
257 and it needs to be::
259  import config
260  from dbinit import open, init
261  from interfaces import Client, MailGW
263 Due to the new templating having a top-level ``page`` that defines links for
264 searching, indexes, adding items etc, the following variables are no longer
265 used:
267 - HEADER_INDEX_LINKS
268 - HEADER_ADD_LINKS
269 - HEADER_SEARCH_LINKS
270 - SEARCH_FILTERS
271 - DEFAULT_INDEX
272 - UNASSIGNED_INDEX
273 - USER_INDEX
274 - ISSUE_FILTER
276 The new security implementation will require additions to the dbinit module,
277 but also removes the need for the following tracker config variables:
279 - ANONYMOUS_ACCESS
280 - ANONYMOUS_REGISTER
282 but requires two new variables which define the Roles assigned to users who
283 register through the web and e-mail interfaces:
285 - NEW_WEB_USER_ROLES
286 - NEW_EMAIL_USER_ROLES
288 in both cases, 'User' is a good initial setting. To emulate
289 ``ANONYMOUS_ACCESS='deny'``, remove all "View" Permissions from the
290 "Anonymous" Role. To emulate ``ANONYMOUS_REGISTER='deny'``, remove the "Web
291 Registration" and/or the "Email Registration" Permission from the "Anonymous"
292 Role. See the section on customising security in the `customisation
293 documentation`_ for more information.
295 Finally, the following config variables have been renamed to make more sense:
297 - INSTANCE_HOME -> TRACKER_HOME
298 - INSTANCE_NAME -> TRACKER_NAME
299 - ISSUE_TRACKER_WEB -> TRACKER_WEB
300 - ISSUE_TRACKER_EMAIL -> TRACKER_EMAIL
303 0.5.0 Schema Specification
304 --------------------------
306 0.5.0 Database backend changes
307 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
309 Your select_db module in your tracker has changed a fair bit. Where it used
310 to contain::
312  # WARNING: DO NOT EDIT THIS FILE!!!
313  from roundup.backends.back_anydbm import Database
315 it must now contain::
317  # WARNING: DO NOT EDIT THIS FILE!!!
318  from roundup.backends.back_anydbm import Database, Class, FileClass, IssueClass
320 Yes, I realise the irony of the "DO NOT EDIT THIS FILE" statement :)
321 Note the addition of the Class, FileClass, IssueClass imports. These are very
322 important, as they're going to make the next change work too. You now need to
323 modify the top of the dbinit module in your tracker from::
325  import instance_config
326  from roundup import roundupdb
327  from select_db import Database
329  from roundup.roundupdb import Class, FileClass
331  class Database(roundupdb.Database, select_db.Database):
332      ''' Creates a hybrid database from:
333           . the selected database back-end from select_db
334           . the roundup extensions from roundupdb
335      '''
336      pass
338  class IssueClass(roundupdb.IssueClass):
339      ''' issues need the email information
340      '''
341      pass
343 to::
345  import config
346  from select_db import Database, Class, FileClass, IssueClass
348 Yes, remove the Database and IssueClass definitions and those other imports.
349 They're not needed any more!
351 Look for places in dbinit.py where ``instance_config`` is used too, and
352 rename them ``config``.
355 0.5.0 Journalling changes
356 ~~~~~~~~~~~~~~~~~~~~~~~~~
358 Journalling has been optimised for storage. Journalling of links has been
359 turned back on by default. If your tracker has a large user base, you may wish
360 to turn off journalling of nosy list, message author and message recipient
361 link and unlink events. You do this by adding ``do_journal='no'`` to the Class
362 initialisation in your dbinit. For example, your *msg* class initialisation
363 probably looks like this::
365     msg = FileClass(db, "msg",
366                     author=Link("user"), recipients=Multilink("user"),
367                     date=Date(),         summary=String(),
368                     files=Multilink("file"),
369                     messageid=String(),  inreplyto=String())
371 to turn off journalling of author and recipient link events, add
372 ``do_journal='no'`` to the ``author=Link("user")`` part of the statement,
373 like so::
375     msg = FileClass(db, "msg",
376                     author=Link("user", do_journal='no'),
377                     recipients=Multilink("user", do_journal='no'),
378                     date=Date(),         summary=String(),
379                     files=Multilink("file"),
380                     messageid=String(),  inreplyto=String())
382 Nosy list link event journalling is actually turned off by default now. If you
383 want to turn it on, change to your issue class' nosy list, change its
384 definition from::
386     issue = IssueClass(db, "issue",
387                     assignedto=Link("user"), topic=Multilink("keyword"),
388                     priority=Link("priority"), status=Link("status"))
390 to::
392     issue = IssueClass(db, "issue", nosy=Multilink("user", do_journal='yes'),
393                     assignedto=Link("user"), topic=Multilink("keyword"),
394                     priority=Link("priority"), status=Link("status"))
396 noting that your definition of the nosy Multilink will override the normal one.
399 0.5.0 User schema changes
400 ~~~~~~~~~~~~~~~~~~~~~~~~~
402 Users have two more properties, "queries" and "roles". You'll have something
403 like this in your dbinit module now::
405     user = Class(db, "user",
406                     username=String(),   password=Password(),
407                     address=String(),    realname=String(),
408                     phone=String(),      organisation=String(),
409                     alternate_addresses=String())
410     user.setkey("username")
412 and you'll need to add the new properties and the new "query" class to it
413 like so::
415     query = Class(db, "query",
416                     klass=String(),     name=String(),
417                     url=String())
418     query.setkey("name")
420     # Note: roles is a comma-separated string of Role names
421     user = Class(db, "user",
422                     username=String(),   password=Password(),
423                     address=String(),    realname=String(),
424                     phone=String(),      organisation=String(),
425                     alternate_addresses=String(),
426                     queries=Multilink('query'), roles=String())
427     user.setkey("username")
429 The "queries" property is used to store off the user's favourite database
430 queries. The "roles" property is explained below in `0.5.0 Security
431 Settings`_.
434 0.5.0 Security Settings
435 ~~~~~~~~~~~~~~~~~~~~~~~
437 See the `security documentation`_ for an explanation of how the new security
438 system works. In a nutshell though, the security is handled as a four step
439 process:
441 1. Permissions are defined as having a name and optionally a hyperdb class
442    they're specific to,
443 2. Roles are defined that have one or more Permissions,
444 3. Users are assigned Roles in their "roles" property, and finally
445 4. Roundup checks that users have appropriate Permissions at appropriate times
446    (like editing issues).
448 Your tracker dbinit module's *open* function now has to define any
449 Permissions that are specific to your tracker, and also the assignment
450 of Permissions to Roles. At the moment, your open function
451 ends with::
453     import detectors
454     detectors.init(db)
456     return db
458 and what we need to do is insert some commands that will set up the security
459 parameters. Right above the ``import detectors`` line, you'll want to insert
460 these lines::
462     #
463     # SECURITY SETTINGS
464     #
465     # new permissions for this schema
466     for cl in 'issue', 'file', 'msg', 'user':
467         db.security.addPermission(name="Edit", klass=cl,
468             description="User is allowed to edit "+cl)
469         db.security.addPermission(name="View", klass=cl,
470             description="User is allowed to access "+cl)
472     # Assign the access and edit permissions for issue, file and message
473     # to regular users now
474     for cl in 'issue', 'file', 'msg':
475         p = db.security.getPermission('View', cl)
476         db.security.addPermissionToRole('User', p)
477         p = db.security.getPermission('Edit', cl)
478         db.security.addPermissionToRole('User', p)
479     # and give the regular users access to the web and email interface
480     p = db.security.getPermission('Web Access')
481     db.security.addPermissionToRole('User', p)
482     p = db.security.getPermission('Email Access')
483     db.security.addPermissionToRole('User', p)
485     # May users view other user information? Comment these lines out
486     # if you don't want them to
487     p = db.security.getPermission('View', 'user')
488     db.security.addPermissionToRole('User', p)
490     # Assign the appropriate permissions to the anonymous user's Anonymous
491     # Role. Choices here are:
492     # - Allow anonymous users to register through the web
493     p = db.security.getPermission('Web Registration')
494     db.security.addPermissionToRole('Anonymous', p)
495     # - Allow anonymous (new) users to register through the email gateway
496     p = db.security.getPermission('Email Registration')
497     db.security.addPermissionToRole('Anonymous', p)
498     # - Allow anonymous users access to the "issue" class of data
499     #   Note: this also grants access to related information like files,
500     #         messages, statuses etc that are linked to issues
501     #p = db.security.getPermission('View', 'issue')
502     #db.security.addPermissionToRole('Anonymous', p)
503     # - Allow anonymous users access to edit the "issue" class of data
504     #   Note: this also grants access to create related information like
505     #         files and messages etc that are linked to issues
506     #p = db.security.getPermission('Edit', 'issue')
507     #db.security.addPermissionToRole('Anonymous', p)
509     # oh, g'wan, let anonymous access the web interface too
510     p = db.security.getPermission('Web Access')
511     db.security.addPermissionToRole('Anonymous', p)
513 Note in the comments there the places where you might change the permissions
514 to restrict users or grant users more access. If you've created additional
515 classes that users should be able to edit and view, then you should add them
516 to the "new permissions for this schema" section at the start of the security
517 block. Then add them to the "Assign the access and edit permissions" section
518 too, so people actually have the new Permission you've created.
520 One final change is needed that finishes off the security system's
521 initialisation. We need to add a call to ``db.post_init()`` at the end of the
522 dbinit open() function. Add it like this::
524     import detectors
525     detectors.init(db)
527     # schema is set up - run any post-initialisation
528     db.post_init()
529     return db
531 You may verify the setup of Permissions and Roles using the new
532 "``roundup-admin security``" command.
535 0.5.0 User changes
536 ~~~~~~~~~~~~~~~~~~
538 To support all those schema changes, you'll need to massage your user database
539 a little too, to:
541 1. make sure there's an "anonymous" user - this user is mandatory now and is
542    the one that unknown users are logged in as.
543 2. make sure all users have at least one Role.
545 If you don't have the "anonymous" user, create it now with the command::
547   roundup-admin create user username=anonymous roles=Anonymous
549 making sure the capitalisation is the same as above. Once you've done that,
550 you'll need to set the roles property on all users to a reasonable default.
551 The admin user should get "Admin", the anonymous user "Anonymous"
552 and all other users "User". The ``fixroles.py`` script in the tools directory
553 will do this. Run it like so (where python is your python 2+ binary)::
555   python tools/fixroles.py -i <tracker home> fixroles
559 0.5.0 CGI interface changes
560 ---------------------------
562 The CGI interface code was completely reorganised and largely rewritten. The
563 end result is that this section of your tracker interfaces module will need
564 changing from::
566  from roundup import cgi_client, mailgw
567  from roundup.i18n import _
568  
569  class Client(cgi_client.Client):
570      ''' derives basic CGI implementation from the standard module,
571          with any specific extensions
572      '''
573      pass
575 to::
577  from roundup import mailgw
578  from roundup.cgi import client
579  
580  class Client(client.Client): 
581      ''' derives basic CGI implementation from the standard module,
582          with any specific extensions
583      '''
584      pass
586 You will also need to install the new version of roundup.cgi from the source
587 cgi-bin directory if you're using it.
590 0.5.0 HTML templating
591 ---------------------
593 You'll want to make a backup of your current tracker html directory. You
594 should then copy the html directory from the Roundup source "classic" template
595 and modify it according to your local schema changes.
597 If you need help with the new templating system, please ask questions on the
598 roundup-users mailing list (available through the roundup project page on
599 sourceforge, http://roundup.sf.net/)
602 0.5.0 Detectors
603 ---------------
605 The nosy reactor has been updated to handle the tracker not having an
606 "assignedto" property on issues. You may want to copy it into your tracker's
607 detectors directory. Chances are you've already fixed it though :)
610 Migrating from 0.4.1 to 0.4.2
611 =============================
613 0.4.2 Configuration
614 -------------------
615 The USER_INDEX definition introduced in 0.4.1 was too restrictive in its
616 allowing replacement of 'assignedto' with the user's userid. Users must change
617 the None value of 'assignedto' to 'CURRENT USER' (the string, in quotes) for
618 the replacement behaviour to occur now.
620 The new configuration variables are:
622 - EMAIL_KEEP_QUOTED_TEXT 
623 - EMAIL_LEAVE_BODY_UNCHANGED
624 - ADD_RECIPIENTS_TO_NOSY
626 See the sample configuration files in::
628  <roundup source>/roundup/templates/classic/instance_config.py
630 and::
632  <roundup source>/roundup/templates/extended/instance_config.py
634 and the `customisation documentation`_ for information on how they're used.
637 0.4.2 Changes to detectors
638 --------------------------
639 You will need to copy the detectors from the distribution into your instance
640 home "detectors" directory. If you used the classic schema, the detectors
641 are in::
643  <roundup source>/roundup/templates/classic/detectors/
645 If you used the extended schema, the detectors are in::
647  <roundup source>/roundup/templates/extended/detectors/
649 The change means that schema-specific code has been removed from the
650 mail gateway and cgi interface and made into auditors:
652 - nosyreactor.py has now got an updatenosy auditor which updates the nosy
653   list with author, recipient and assignedto information.
654 - statusauditor.py makes the unread or resolved -> chatting changes and
655   presets the status of an issue to unread.
657 There's also a bug or two fixed in the nosyreactor code.
659 0.4.2 HTML templating changes
660 -----------------------------
661 The link() htmltemplate function now has a "showid" option for links and
662 multilinks. When true, it only displays the linked item id as the anchor
663 text. The link value is displayed as a tooltip using the title anchor
664 attribute. To use in eg. the superseder field, have something like this::
666    <td>
667     <display call="field('superseder', showid=1)">
668     <display call="classhelp('issue', 'id,title', label='list', width=500)">
669     <property name="superseder">
670      <br>View: <display call="link('superseder', showid=1)">
671     </property>
672    </td>
674 The stylesheets have been cleaned up too. You may want to use the newer
675 versions in::
677  <roundup source>/roundup/templates/<template>/html/default.css
681 Migrating from 0.4.0 to 0.4.1
682 =============================
684 0.4.1 Files storage
685 -------------------
687 Messages and files from newly created issues will be put into subdierectories
688 in thousands e.g. msg123 will be put into files/msg/0/msg123, file2003
689 will go into files/file/2/file2003. Previous messages are still found, but
690 could be put into this structure.
692 0.4.1 Configuration
693 -------------------
695 To allow more fine-grained access control, the variable used to check
696 permission to auto-register users in the mail gateway is now called
697 ANONYMOUS_REGISTER_MAIL rather than overloading ANONYMOUS_REGISTER. If the
698 variable doesn't exist, then ANONYMOUS_REGISTER is tested as before.
700 Configuring the links in the web header is now easier too. The following
701 variables have been added to the classic instance_config.py::
703   HEADER_INDEX_LINKS   - defines the "index" links to be made available
704   HEADER_ADD_LINKS     - defines the "add" links
705   DEFAULT_INDEX        - specifies the index view for DEFAULT
706   UNASSIGNED_INDEX     - specifies the index view for UNASSIGNED
707   USER_INDEX           - specifies the index view for USER
709 See the <roundup source>/roundup/templates/classic/instance_config.py for more
710 information - including how the variables are to be set up. Most users will
711 just be able to copy the variables from the source to their instance home. If
712 you've modified the header by changing the source of the interfaces.py file in
713 the instance home, you'll need to remove that customisation and move it into
714 the appropriate variables in instance_config.py.
716 The extended schema has similar variables added too - see the source for more
717 info.
719 0.4.1 Alternate E-Mail Addresses
720 --------------------------------
722 If you add the property "alternate_addresses" to your user class, your users
723 will be able to register alternate email addresses that they may use to
724 communicate with roundup as. All email from roundup will continue to be sent
725 to their primary address.
727 If you have not edited the dbinit.py file in your instance home directory,
728 you may simply copy the new dbinit.py file from the core code. If you used
729 the classic schema, the interfaces file is in::
731  <roundup source>/roundup/templates/classic/dbinit.py
733 If you used the extended schema, the file is in::
735  <roundup source>/roundup/templates/extended/dbinit.py 
737 If you have modified your dbinit.py file, you need to edit the dbinit.py
738 file in your instance home directory. Find the lines which define the user
739 class::
741     user = Class(db, "msg",
742                     username=String(),   password=Password(),
743                     address=String(),    realname=String(), 
744                     phone=String(),      organisation=String(),
745                     alternate_addresses=String())
747 You will also want to add the property to the user's details page. The
748 template for this is the "user.item" file in your instance home "html"
749 directory. Similar to above, you may copy the file from the roundup source if
750 you haven't modified it. Otherwise, add the following to the template::
752    <display call="multiline('alternate_addresses')">
754 with appropriate labelling etc. See the standard template for an idea.
758 Migrating from 0.3.x to 0.4.0
759 =============================
761 0.4.0 Message-ID and In-Reply-To addition
762 -----------------------------------------
763 0.4.0 adds the tracking of messages by message-id and allows threading
764 using in-reply-to. Most e-mail clients support threading using this
765 feature, and we hope to add support for it to the web gateway. If you
766 have not edited the dbinit.py file in your instance home directory, you may
767 simply copy the new dbinit.py file from the core code. If you used the
768 classic schema, the interfaces file is in::
770  <roundup source>/roundup/templates/classic/dbinit.py
772 If you used the extended schema, the file is in::
774  <roundup source>/roundup/templates/extended/dbinit.py 
776 If you have modified your dbinit.py file, you need to edit the dbinit.py
777 file in your instance home directory. Find the lines which define the msg
778 class::
780     msg = FileClass(db, "msg",
781                     author=Link("user"), recipients=Multilink("user"),
782                     date=Date(),         summary=String(),
783                     files=Multilink("file"))
785 and add the messageid and inreplyto properties like so::
787     msg = FileClass(db, "msg",
788                     author=Link("user"), recipients=Multilink("user"),
789                     date=Date(),         summary=String(),
790                     files=Multilink("file"),
791                     messageid=String(),  inreplyto=String())
793 Also, configuration is being cleaned up. This means that your dbinit.py will
794 also need to be changed in the open function. If you haven't changed your
795 dbinit.py, the above copy will be enough. If you have, you'll need to change
796 the line (round line 50)::
798     db = Database(instance_config.DATABASE, name)
800 to::
802     db = Database(instance_config, name)
805 0.4.0 Configuration
806 --------------------
807 ``TRACKER_NAME`` and ``EMAIL_SIGNATURE_POSITION`` have been added to the
808 instance_config.py. The simplest solution is to copy the default values
809 from template in the core source.
811 The mail gateway now checks ``ANONYMOUS_REGISTER`` to see if unknown users
812 are to be automatically registered with the tracker. If it is set to "deny"
813 then unknown users will not have access. If it is set to "allow" they will be
814 automatically registered with the tracker.
817 0.4.0 CGI script roundup.cgi
818 ----------------------------
819 The CGI script has been updated with some features and a bugfix, so you should
820 copy it from the roundup cgi-bin source directory again. Make sure you update
821 the ROUNDUP_INSTANCE_HOMES after the copy.
824 0.4.0 Nosy reactor
825 ------------------
826 The nosy reactor has also changed - copy the nosyreactor.py file from the core
827 source::
829    <roundup source>/roundup/templates/<template>/detectors/nosyreactor.py
831 to your instance home "detectors" directory.
834 0.4.0 HTML templating
835 ---------------------
836 The field() function was incorrectly implemented - links and multilinks now
837 display as text fields when rendered using field(). To display a menu (drop-
838 down or select box) you need to use the menu() function.
842 Migrating from 0.2.x to 0.3.x
843 =============================
845 0.3.x Cookie Authentication changes
846 -----------------------------------
847 0.3.0 introduces cookie authentication - you will need to copy the
848 interfaces.py file from the roundup source to your instance home to enable
849 authentication. If you used the classic schema, the interfaces file is in::
851  <roundup source>/roundup/templates/classic/interfaces.py
853 If you used the extended schema, the file is in::
855  <roundup source>/roundup/templates/extended/interfaces.py
857 If you have modified your interfaces.Client class, you will need to take
858 note of the login/logout functionality provided in roundup.cgi_client.Client
859 (classic schema) or roundup.cgi_client.ExtendedClient (extended schema) and
860 modify your instance code apropriately.
863 0.3.x Password encoding
864 -----------------------
865 This release also introduces encoding of passwords in the database. If you
866 have not edited the dbinit.py file in your instance home directory, you may
867 simply copy the new dbinit.py file from the core code. If you used the
868 classic schema, the interfaces file is in::
870  <roundup source>/roundup/templates/classic/dbinit.py
872 If you used the extended schema, the file is in::
874  <roundup source>/roundup/templates/extended/dbinit.py
877 If you have modified your dbinit.py file, you may use encoded passwords:
879 1. Edit the dbinit.py file in your instance home directory
880    a. At the first code line of the open() function::
882        from roundup.hyperdb import String, Date, Link, Multilink
884       alter to include Password, as so::
886        from roundup.hyperdb import String, Password, Date, Link, Multilink
888    b. Where the password property is defined (around line 66)::
890        user = Class(db, "user", 
891                        username=String(),   password=String(),
892                        address=String(),    realname=String(), 
893                        phone=String(),      organisation=String())
894        user.setkey("username")
896       alter the "password=String()" to "password=Password()"::
898        user = Class(db, "user", 
899                        username=String(),   password=Password(),
900                        address=String(),    realname=String(), 
901                        phone=String(),      organisation=String())
902        user.setkey("username")
904 2. Any existing passwords in the database will remain cleartext until they
905    are edited. It is recommended that at a minimum the admin password be
906    changed immediately::
908       roundup-admin -i <instance home> set user1 password=<new password>
911 0.3.x Configuration
912 -------------------
913 FILTER_POSITION, ANONYMOUS_ACCESS, ANONYMOUS_REGISTER have been added to
914 the instance_config.py. Simplest solution is to copy the default values from
915 template in the core source.
917 MESSAGES_TO_AUTHOR has been added to the IssueClass in dbinit.py. Set to 'yes'
918 to send nosy messages to the author. Default behaviour is to not send nosy
919 messages to the author. You will need to add MESSAGES_TO_AUTHOR to your
920 dbinit.py in your instance home.
923 0.3.x CGI script roundup.cgi
924 ----------------------------
925 There have been some structural changes to the roundup.cgi script - you will
926 need to install it again from the cgi-bin directory of the source
927 distribution. Make sure you update the ROUNDUP_INSTANCE_HOMES after the
928 copy.
931 .. _`customisation documentation`: customizing.html
932 .. _`security documentation`: security.html
933 .. _`administration guide`: admin.html