Code

doc cleanup, editing and creation of a What's New
[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::
12 Migrating from 0.6 to 0.7
13 =========================
15 0.7.0 Permission assignments
16 ----------------------------
18 Due to a change in the rendering of web widgets, permissions are now
19 checked on Classes where they previously weren't (this is a good thing).
21 You will need to add some additional Permission assignments for your
22 regular users, or some displays will break. After the following in your 
23 tracker's ``dbinit.py``::
25     # Assign the access and edit Permissions for issue, file and message
26     # to regular users now
27     for cl in 'issue', 'file', 'msg', 'query', 'keyword':
28         p = db.security.getPermission('View', cl)
29         db.security.addPermissionToRole('User', p)
30         p = db.security.getPermission('Edit', cl)
31         db.security.addPermissionToRole('User', p)
33 add::
35     for cl in 'priority', 'status':
36         p = db.security.getPermission('View', cl)
37         db.security.addPermissionToRole('User', p)
40 0.7.0 Getting the current user id
41 ---------------------------------
43 Removed Database.curuserid attribute. Any code referencing this attribute
44 should be replaced with a call to Database.getuid().
47 0.7.0 ZRoundup changes
48 ----------------------
50 The templates in your tracker's html directory will need updating if you
51 wish to use ZRoundup. If you've not modified those files (or some of them),
52 you may just copy the new versions from the Roundup source in the
53 templates/classic/html directory.
55 If you have modified the html files, then you'll need to manually edit them
56 to change all occurances of special form variables from using the colon ":"
57 special character to the at "@" special character. That is, variables such
58 as::
60   :action :required :template :remove:messages ...
62 should become:
64   @action @required @template @remove@messages ...
66 Note that ``tal:`` statements are unaffected. So are TAL expression type
67 prefixes such as ``python:`` and ``string:``. Please ask on the
68 roundup-users mailing list for help if you're unsure.
71 Migrating from 0.6.x to 0.6.3
72 =============================
74 0.6.3 Configuration
75 -------------------
77 You will need to copy the file::
79   templates/classic/detectors/__init__.py
81 to your tracker's ``detectors`` directory, replacing the one already there.
82 This fixes a couple of bugs in that file.
86 Migrating from 0.5 to 0.6
87 =========================
90 0.6.0 Configuration
91 -------------------
93 Introduced EMAIL_FROM_TAG config variable. This value is inserted into
94 the From: line of nosy email. If the sending user is "Foo Bar", the
95 From: line is usually::
97      "Foo Bar" <issue_tracker@tracker.example>
99 the EMAIL_FROM_TAG goes inside the "Foo Bar" quotes like so::
101      "Foo Bar EMAIL_FROM_TAG" <issue_tracker@tracker.example>
103 I've altered the mechanism in the detectors __init__.py module so that it
104 doesn't cross-import detectors from other trackers (if you run more than one
105 in a single roundup-server). This change means that you'll need to copy the
106 __init__.py from roundup/templates/classic/detectors/__init__.py to your
107 <tracker home>/detectors/__init__.py. Don't worry, the "classic" __init__ is a
108 one-size-fits-all, so it'll work even if you've added/removed detectors.
110 0.6.0 Templating changes
111 ------------------------
113 The ``user.item`` template (in the tracker home "templates" directory)
114 needs to have the following hidden variable added to its form (between the
115 ``<form...>`` and ``</form>`` tags::
117   <input type="hidden" name=":template" value="item">
120 0.6.0 Form handling changes
121 ---------------------------
123 Roundup's form handling capabilities have been significantly expanded. This
124 should not affect users of 0.5 installations - but if you find you're
125 getting errors from form submissions, please ask for help on the Roundup
126 users mailing list:
128   http://lists.sourceforge.net/lists/listinfo/roundup-users
130 See the customisation doc section on `Form Values`__ for documentation of the
131 new form variables possible.
133 __ customizing.html#form-values
136 0.6.0 Multilingual character set support
137 ----------------------------------------
139 Added internationalization support. This is done via encoding all data
140 stored in roundup database to utf-8 (unicode encoding). To support utf-8 in
141 web interface you should add the folowing line to your tracker's html/page
142 and html/_generic.help files inside <head> tag::
143   
144     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
146 Since latin characters in utf-8 have the same codes as in ASCII table, this
147 modification is optional for users who use only plain latin characters. 
149 After this modification, you will be able to see and enter any world
150 character via web interface. Data received via mail interface also converted
151 to utf-8, however only new messages will be converted. If your roundup
152 database contains some of non-ASCII characters in one of 8-bit encoding,
153 they will not be visible in new unicode environment. Some of such data (e.g.
154 user names, keywords, etc)  can be edited by administrator, the others
155 (e.g. messages' contents) is not editable via web interface. Currently there
156 is no tool for converting such data, the only solution is to close
157 appropriate old issues and create new ones with the same content.
160 0.6.0 User timezone support
161 ---------------------------
163 From version 0.6.0 roundup supports displaying of Date data in user' local
164 timezone if he/she has provided timezone information. To make it possible
165 some modification to tracker's schema and HTML templates are required.
166 First you must add string property 'timezone' to user class in dbinit.py
167 like this::
168   
169     user = Class(db, "user", 
170                     username=String(),   password=Password(),
171                     address=String(),    realname=String(), 
172                     phone=String(),      organisation=String(),
173                     alternate_addresses=String(),
174                     queries=Multilink('query'), roles=String(),
175                     timezone=String())
176   
177 And second - html interface. Add following lines to
178 $TRACKER_HOME/html/user.item template::
179   
180      <tr>
181       <th>Timezone</th>
182       <td tal:content="structure context/timezone/field">timezone</td>
183      </tr>
185 After that all users should be able to provide their timezone information.
186 Timezone should be a positive or negative integer - offset from GMT.
188 After providing timezone, roundup will show all dates values, found in web
189 and mail interfaces in local time. It will also accept any Date info in
190 local time, convert and store it in GMT.
193 0.6.0 Search page structure
194 ---------------------------
196 In order to accomodate query editing the search page has been restructured. If
197 you want to provide your users with query editing, you should update your
198 search page using the macros detailed in the customisation doc section
199 `Searching on categories`__.
201 __ customizing.html#searching-on-categories
203 Also, the url field in the query class no longer starts with a '?'. You'll need
204 to remove this question mark from the url field to support queries. There's
205 a script in the "tools" directory called ``migrate-queries.py`` that should
206 automatically change any existing queries for you. As always, make a backup
207 of your database before running such a script.
210 0.6.0 Notes for metakit backend users
211 -------------------------------------
213 Roundup 0.6.0 introduced searching on ranges of dates and intervals. To
214 support it, some modifications to interval storing routine were made. So if
215 your tracker uses metakit backend and your db schema contains intervals
216 property, searches on that property will not be accurate for db items that
217 was stored before roundup' upgrade. However all new records should be
218 searchable on intervals.
220 It is possible to convert your database to new format: you can export and
221 import back all your data (consult "Migrating backends" in "Maintenance"
222 documentation). After this operation all your interval properties should
223 become searchable.
225 Users of backends others than metakit should not worry about this issue.
228 Migrating from 0.4.x to 0.5.0
229 =============================
231 This has been a fairly major revision of Roundup:
233 1. Brand new, much more powerful, flexible, tasty and nutritious templating.
234    Unfortunately, this means all your current templates are useless. Hopefully
235    the new documentation and examples will be enough to help you make the
236    transition. Please don't hesitate to ask on roundup-users for help (or
237    complete conversions if you're completely stuck)!
238 2. The database backed got a lot more flexible, allowing Metakit and SQL
239    databases! The only decent SQL database implemented at present is sqlite,
240    but others shouldn't be a whole lot more work.
241 3. A brand new, highly flexible and much more robust security system including
242    a system of Permissions, Roles and Role assignments to users. You may now
243    define your own Permissions that may be checked in CGI transactions.
244 4. Journalling has been made less storage-hungry, so has been turned on
245    by default *except* for author, recipient and nosy link/unlink events. You
246    are advised to turn it off in your trackers too.
247 5. We've changed the terminology from "instance" to "tracker", to ease the
248    learning curve/impact for new users.
249 6. Because of the above changes, the tracker configuration has seen some
250    major changes. See below for the details.
252 Please, **back up your database** before you start the migration process. This
253 is as simple as copying the "db" directory and all its contents from your
254 tracker to somewhere safe.
257 0.5.0 Configuration
258 -------------------
260 First up, rename your ``instance_config.py`` file to just ``config.py``.
262 Then edit your tracker's ``__init__.py`` module. It'll currently look
263 like this::
265  from instance_config import *
266  try:
267      from dbinit import *
268  except ImportError:
269      pass # in installdir (probably :)
270  from interfaces import *
272 and it needs to be::
274  import config
275  from dbinit import open, init
276  from interfaces import Client, MailGW
278 Due to the new templating having a top-level ``page`` that defines links for
279 searching, indexes, adding items etc, the following variables are no longer
280 used:
282 - HEADER_INDEX_LINKS
283 - HEADER_ADD_LINKS
284 - HEADER_SEARCH_LINKS
285 - SEARCH_FILTERS
286 - DEFAULT_INDEX
287 - UNASSIGNED_INDEX
288 - USER_INDEX
289 - ISSUE_FILTER
291 The new security implementation will require additions to the dbinit module,
292 but also removes the need for the following tracker config variables:
294 - ANONYMOUS_ACCESS
295 - ANONYMOUS_REGISTER
297 but requires two new variables which define the Roles assigned to users who
298 register through the web and e-mail interfaces:
300 - NEW_WEB_USER_ROLES
301 - NEW_EMAIL_USER_ROLES
303 in both cases, 'User' is a good initial setting. To emulate
304 ``ANONYMOUS_ACCESS='deny'``, remove all "View" Permissions from the
305 "Anonymous" Role. To emulate ``ANONYMOUS_REGISTER='deny'``, remove the "Web
306 Registration" and/or the "Email Registration" Permission from the "Anonymous"
307 Role. See the section on customising security in the `customisation
308 documentation`_ for more information.
310 Finally, the following config variables have been renamed to make more sense:
312 - INSTANCE_HOME -> TRACKER_HOME
313 - INSTANCE_NAME -> TRACKER_NAME
314 - ISSUE_TRACKER_WEB -> TRACKER_WEB
315 - ISSUE_TRACKER_EMAIL -> TRACKER_EMAIL
318 0.5.0 Schema Specification
319 --------------------------
321 0.5.0 Database backend changes
322 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
324 Your select_db module in your tracker has changed a fair bit. Where it used
325 to contain::
327  # WARNING: DO NOT EDIT THIS FILE!!!
328  from roundup.backends.back_anydbm import Database
330 it must now contain::
332  # WARNING: DO NOT EDIT THIS FILE!!!
333  from roundup.backends.back_anydbm import Database, Class, FileClass, IssueClass
335 Yes, I realise the irony of the "DO NOT EDIT THIS FILE" statement :)
336 Note the addition of the Class, FileClass, IssueClass imports. These are very
337 important, as they're going to make the next change work too. You now need to
338 modify the top of the dbinit module in your tracker from::
340  import instance_config
341  from roundup import roundupdb
342  from select_db import Database
344  from roundup.roundupdb import Class, FileClass
346  class Database(roundupdb.Database, select_db.Database):
347      ''' Creates a hybrid database from:
348           . the selected database back-end from select_db
349           . the roundup extensions from roundupdb
350      '''
351      pass
353  class IssueClass(roundupdb.IssueClass):
354      ''' issues need the email information
355      '''
356      pass
358 to::
360  import config
361  from select_db import Database, Class, FileClass, IssueClass
363 Yes, remove the Database and IssueClass definitions and those other imports.
364 They're not needed any more!
366 Look for places in dbinit.py where ``instance_config`` is used too, and
367 rename them ``config``.
370 0.5.0 Journalling changes
371 ~~~~~~~~~~~~~~~~~~~~~~~~~
373 Journalling has been optimised for storage. Journalling of links has been
374 turned back on by default. If your tracker has a large user base, you may wish
375 to turn off journalling of nosy list, message author and message recipient
376 link and unlink events. You do this by adding ``do_journal='no'`` to the Class
377 initialisation in your dbinit. For example, your *msg* class initialisation
378 probably looks like this::
380     msg = FileClass(db, "msg",
381                     author=Link("user"), recipients=Multilink("user"),
382                     date=Date(),         summary=String(),
383                     files=Multilink("file"),
384                     messageid=String(),  inreplyto=String())
386 to turn off journalling of author and recipient link events, add
387 ``do_journal='no'`` to the ``author=Link("user")`` part of the statement,
388 like so::
390     msg = FileClass(db, "msg",
391                     author=Link("user", do_journal='no'),
392                     recipients=Multilink("user", do_journal='no'),
393                     date=Date(),         summary=String(),
394                     files=Multilink("file"),
395                     messageid=String(),  inreplyto=String())
397 Nosy list link event journalling is actually turned off by default now. If you
398 want to turn it on, change to your issue class' nosy list, change its
399 definition from::
401     issue = IssueClass(db, "issue",
402                     assignedto=Link("user"), topic=Multilink("keyword"),
403                     priority=Link("priority"), status=Link("status"))
405 to::
407     issue = IssueClass(db, "issue", nosy=Multilink("user", do_journal='yes'),
408                     assignedto=Link("user"), topic=Multilink("keyword"),
409                     priority=Link("priority"), status=Link("status"))
411 noting that your definition of the nosy Multilink will override the normal one.
414 0.5.0 User schema changes
415 ~~~~~~~~~~~~~~~~~~~~~~~~~
417 Users have two more properties, "queries" and "roles". You'll have something
418 like this in your dbinit module now::
420     user = Class(db, "user",
421                     username=String(),   password=Password(),
422                     address=String(),    realname=String(),
423                     phone=String(),      organisation=String(),
424                     alternate_addresses=String())
425     user.setkey("username")
427 and you'll need to add the new properties and the new "query" class to it
428 like so::
430     query = Class(db, "query",
431                     klass=String(),     name=String(),
432                     url=String())
433     query.setkey("name")
435     # Note: roles is a comma-separated string of Role names
436     user = Class(db, "user",
437                     username=String(),   password=Password(),
438                     address=String(),    realname=String(),
439                     phone=String(),      organisation=String(),
440                     alternate_addresses=String(),
441                     queries=Multilink('query'), roles=String())
442     user.setkey("username")
444 The "queries" property is used to store off the user's favourite database
445 queries. The "roles" property is explained below in `0.5.0 Security
446 Settings`_.
449 0.5.0 Security Settings
450 ~~~~~~~~~~~~~~~~~~~~~~~
452 See the `security documentation`_ for an explanation of how the new security
453 system works. In a nutshell though, the security is handled as a four step
454 process:
456 1. Permissions are defined as having a name and optionally a hyperdb class
457    they're specific to,
458 2. Roles are defined that have one or more Permissions,
459 3. Users are assigned Roles in their "roles" property, and finally
460 4. Roundup checks that users have appropriate Permissions at appropriate times
461    (like editing issues).
463 Your tracker dbinit module's *open* function now has to define any
464 Permissions that are specific to your tracker, and also the assignment
465 of Permissions to Roles. At the moment, your open function
466 ends with::
468     import detectors
469     detectors.init(db)
471     return db
473 and what we need to do is insert some commands that will set up the security
474 parameters. Right above the ``import detectors`` line, you'll want to insert
475 these lines::
477     #
478     # SECURITY SETTINGS
479     #
480     # new permissions for this schema
481     for cl in 'issue', 'file', 'msg', 'user':
482         db.security.addPermission(name="Edit", klass=cl,
483             description="User is allowed to edit "+cl)
484         db.security.addPermission(name="View", klass=cl,
485             description="User is allowed to access "+cl)
487     # Assign the access and edit permissions for issue, file and message
488     # to regular users now
489     for cl in 'issue', 'file', 'msg':
490         p = db.security.getPermission('View', cl)
491         db.security.addPermissionToRole('User', p)
492         p = db.security.getPermission('Edit', cl)
493         db.security.addPermissionToRole('User', p)
494     # and give the regular users access to the web and email interface
495     p = db.security.getPermission('Web Access')
496     db.security.addPermissionToRole('User', p)
497     p = db.security.getPermission('Email Access')
498     db.security.addPermissionToRole('User', p)
500     # May users view other user information? Comment these lines out
501     # if you don't want them to
502     p = db.security.getPermission('View', 'user')
503     db.security.addPermissionToRole('User', p)
505     # Assign the appropriate permissions to the anonymous user's Anonymous
506     # Role. Choices here are:
507     # - Allow anonymous users to register through the web
508     p = db.security.getPermission('Web Registration')
509     db.security.addPermissionToRole('Anonymous', p)
510     # - Allow anonymous (new) users to register through the email gateway
511     p = db.security.getPermission('Email Registration')
512     db.security.addPermissionToRole('Anonymous', p)
513     # - Allow anonymous users access to the "issue" class of data
514     #   Note: this also grants access to related information like files,
515     #         messages, statuses etc that are linked to issues
516     #p = db.security.getPermission('View', 'issue')
517     #db.security.addPermissionToRole('Anonymous', p)
518     # - Allow anonymous users access to edit the "issue" class of data
519     #   Note: this also grants access to create related information like
520     #         files and messages etc that are linked to issues
521     #p = db.security.getPermission('Edit', 'issue')
522     #db.security.addPermissionToRole('Anonymous', p)
524     # oh, g'wan, let anonymous access the web interface too
525     p = db.security.getPermission('Web Access')
526     db.security.addPermissionToRole('Anonymous', p)
528 Note in the comments there the places where you might change the permissions
529 to restrict users or grant users more access. If you've created additional
530 classes that users should be able to edit and view, then you should add them
531 to the "new permissions for this schema" section at the start of the security
532 block. Then add them to the "Assign the access and edit permissions" section
533 too, so people actually have the new Permission you've created.
535 One final change is needed that finishes off the security system's
536 initialisation. We need to add a call to ``db.post_init()`` at the end of the
537 dbinit open() function. Add it like this::
539     import detectors
540     detectors.init(db)
542     # schema is set up - run any post-initialisation
543     db.post_init()
544     return db
546 You may verify the setup of Permissions and Roles using the new
547 "``roundup-admin security``" command.
550 0.5.0 User changes
551 ~~~~~~~~~~~~~~~~~~
553 To support all those schema changes, you'll need to massage your user database
554 a little too, to:
556 1. make sure there's an "anonymous" user - this user is mandatory now and is
557    the one that unknown users are logged in as.
558 2. make sure all users have at least one Role.
560 If you don't have the "anonymous" user, create it now with the command::
562   roundup-admin create user username=anonymous roles=Anonymous
564 making sure the capitalisation is the same as above. Once you've done that,
565 you'll need to set the roles property on all users to a reasonable default.
566 The admin user should get "Admin", the anonymous user "Anonymous"
567 and all other users "User". The ``fixroles.py`` script in the tools directory
568 will do this. Run it like so (where python is your python 2+ binary)::
570   python tools/fixroles.py -i <tracker home> fixroles
574 0.5.0 CGI interface changes
575 ---------------------------
577 The CGI interface code was completely reorganised and largely rewritten. The
578 end result is that this section of your tracker interfaces module will need
579 changing from::
581  from roundup import cgi_client, mailgw
582  from roundup.i18n import _
583  
584  class Client(cgi_client.Client):
585      ''' derives basic CGI implementation from the standard module,
586          with any specific extensions
587      '''
588      pass
590 to::
592  from roundup import mailgw
593  from roundup.cgi import client
594  
595  class Client(client.Client): 
596      ''' derives basic CGI implementation from the standard module,
597          with any specific extensions
598      '''
599      pass
601 You will also need to install the new version of roundup.cgi from the source
602 cgi-bin directory if you're using it.
605 0.5.0 HTML templating
606 ---------------------
608 You'll want to make a backup of your current tracker html directory. You
609 should then copy the html directory from the Roundup source "classic" template
610 and modify it according to your local schema changes.
612 If you need help with the new templating system, please ask questions on the
613 roundup-users mailing list (available through the roundup project page on
614 sourceforge, http://roundup.sf.net/)
617 0.5.0 Detectors
618 ---------------
620 The nosy reactor has been updated to handle the tracker not having an
621 "assignedto" property on issues. You may want to copy it into your tracker's
622 detectors directory. Chances are you've already fixed it though :)
625 Migrating from 0.4.1 to 0.4.2
626 =============================
628 0.4.2 Configuration
629 -------------------
630 The USER_INDEX definition introduced in 0.4.1 was too restrictive in its
631 allowing replacement of 'assignedto' with the user's userid. Users must change
632 the None value of 'assignedto' to 'CURRENT USER' (the string, in quotes) for
633 the replacement behaviour to occur now.
635 The new configuration variables are:
637 - EMAIL_KEEP_QUOTED_TEXT 
638 - EMAIL_LEAVE_BODY_UNCHANGED
639 - ADD_RECIPIENTS_TO_NOSY
641 See the sample configuration files in::
643  <roundup source>/roundup/templates/classic/instance_config.py
645 and::
647  <roundup source>/roundup/templates/extended/instance_config.py
649 and the `customisation documentation`_ for information on how they're used.
652 0.4.2 Changes to detectors
653 --------------------------
654 You will need to copy the detectors from the distribution into your instance
655 home "detectors" directory. If you used the classic schema, the detectors
656 are in::
658  <roundup source>/roundup/templates/classic/detectors/
660 If you used the extended schema, the detectors are in::
662  <roundup source>/roundup/templates/extended/detectors/
664 The change means that schema-specific code has been removed from the
665 mail gateway and cgi interface and made into auditors:
667 - nosyreactor.py has now got an updatenosy auditor which updates the nosy
668   list with author, recipient and assignedto information.
669 - statusauditor.py makes the unread or resolved -> chatting changes and
670   presets the status of an issue to unread.
672 There's also a bug or two fixed in the nosyreactor code.
674 0.4.2 HTML templating changes
675 -----------------------------
676 The link() htmltemplate function now has a "showid" option for links and
677 multilinks. When true, it only displays the linked item id as the anchor
678 text. The link value is displayed as a tooltip using the title anchor
679 attribute. To use in eg. the superseder field, have something like this::
681    <td>
682     <display call="field('superseder', showid=1)">
683     <display call="classhelp('issue', 'id,title', label='list', width=500)">
684     <property name="superseder">
685      <br>View: <display call="link('superseder', showid=1)">
686     </property>
687    </td>
689 The stylesheets have been cleaned up too. You may want to use the newer
690 versions in::
692  <roundup source>/roundup/templates/<template>/html/default.css
696 Migrating from 0.4.0 to 0.4.1
697 =============================
699 0.4.1 Files storage
700 -------------------
702 Messages and files from newly created issues will be put into subdierectories
703 in thousands e.g. msg123 will be put into files/msg/0/msg123, file2003
704 will go into files/file/2/file2003. Previous messages are still found, but
705 could be put into this structure.
707 0.4.1 Configuration
708 -------------------
710 To allow more fine-grained access control, the variable used to check
711 permission to auto-register users in the mail gateway is now called
712 ANONYMOUS_REGISTER_MAIL rather than overloading ANONYMOUS_REGISTER. If the
713 variable doesn't exist, then ANONYMOUS_REGISTER is tested as before.
715 Configuring the links in the web header is now easier too. The following
716 variables have been added to the classic instance_config.py::
718   HEADER_INDEX_LINKS   - defines the "index" links to be made available
719   HEADER_ADD_LINKS     - defines the "add" links
720   DEFAULT_INDEX        - specifies the index view for DEFAULT
721   UNASSIGNED_INDEX     - specifies the index view for UNASSIGNED
722   USER_INDEX           - specifies the index view for USER
724 See the <roundup source>/roundup/templates/classic/instance_config.py for more
725 information - including how the variables are to be set up. Most users will
726 just be able to copy the variables from the source to their instance home. If
727 you've modified the header by changing the source of the interfaces.py file in
728 the instance home, you'll need to remove that customisation and move it into
729 the appropriate variables in instance_config.py.
731 The extended schema has similar variables added too - see the source for more
732 info.
734 0.4.1 Alternate E-Mail Addresses
735 --------------------------------
737 If you add the property "alternate_addresses" to your user class, your users
738 will be able to register alternate email addresses that they may use to
739 communicate with roundup as. All email from roundup will continue to be sent
740 to their primary address.
742 If you have not edited the dbinit.py file in your instance home directory,
743 you may simply copy the new dbinit.py file from the core code. If you used
744 the classic schema, the interfaces file is in::
746  <roundup source>/roundup/templates/classic/dbinit.py
748 If you used the extended schema, the file is in::
750  <roundup source>/roundup/templates/extended/dbinit.py 
752 If you have modified your dbinit.py file, you need to edit the dbinit.py
753 file in your instance home directory. Find the lines which define the user
754 class::
756     user = Class(db, "msg",
757                     username=String(),   password=Password(),
758                     address=String(),    realname=String(), 
759                     phone=String(),      organisation=String(),
760                     alternate_addresses=String())
762 You will also want to add the property to the user's details page. The
763 template for this is the "user.item" file in your instance home "html"
764 directory. Similar to above, you may copy the file from the roundup source if
765 you haven't modified it. Otherwise, add the following to the template::
767    <display call="multiline('alternate_addresses')">
769 with appropriate labelling etc. See the standard template for an idea.
773 Migrating from 0.3.x to 0.4.0
774 =============================
776 0.4.0 Message-ID and In-Reply-To addition
777 -----------------------------------------
778 0.4.0 adds the tracking of messages by message-id and allows threading
779 using in-reply-to. Most e-mail clients support threading using this
780 feature, and we hope to add support for it to the web gateway. If you
781 have not edited the dbinit.py file in your instance home directory, you may
782 simply copy the new dbinit.py file from the core code. If you used the
783 classic schema, the interfaces file is in::
785  <roundup source>/roundup/templates/classic/dbinit.py
787 If you used the extended schema, the file is in::
789  <roundup source>/roundup/templates/extended/dbinit.py 
791 If you have modified your dbinit.py file, you need to edit the dbinit.py
792 file in your instance home directory. Find the lines which define the msg
793 class::
795     msg = FileClass(db, "msg",
796                     author=Link("user"), recipients=Multilink("user"),
797                     date=Date(),         summary=String(),
798                     files=Multilink("file"))
800 and add the messageid and inreplyto properties like so::
802     msg = FileClass(db, "msg",
803                     author=Link("user"), recipients=Multilink("user"),
804                     date=Date(),         summary=String(),
805                     files=Multilink("file"),
806                     messageid=String(),  inreplyto=String())
808 Also, configuration is being cleaned up. This means that your dbinit.py will
809 also need to be changed in the open function. If you haven't changed your
810 dbinit.py, the above copy will be enough. If you have, you'll need to change
811 the line (round line 50)::
813     db = Database(instance_config.DATABASE, name)
815 to::
817     db = Database(instance_config, name)
820 0.4.0 Configuration
821 --------------------
822 ``TRACKER_NAME`` and ``EMAIL_SIGNATURE_POSITION`` have been added to the
823 instance_config.py. The simplest solution is to copy the default values
824 from template in the core source.
826 The mail gateway now checks ``ANONYMOUS_REGISTER`` to see if unknown users
827 are to be automatically registered with the tracker. If it is set to "deny"
828 then unknown users will not have access. If it is set to "allow" they will be
829 automatically registered with the tracker.
832 0.4.0 CGI script roundup.cgi
833 ----------------------------
834 The CGI script has been updated with some features and a bugfix, so you should
835 copy it from the roundup cgi-bin source directory again. Make sure you update
836 the ROUNDUP_INSTANCE_HOMES after the copy.
839 0.4.0 Nosy reactor
840 ------------------
841 The nosy reactor has also changed - copy the nosyreactor.py file from the core
842 source::
844    <roundup source>/roundup/templates/<template>/detectors/nosyreactor.py
846 to your instance home "detectors" directory.
849 0.4.0 HTML templating
850 ---------------------
851 The field() function was incorrectly implemented - links and multilinks now
852 display as text fields when rendered using field(). To display a menu (drop-
853 down or select box) you need to use the menu() function.
857 Migrating from 0.2.x to 0.3.x
858 =============================
860 0.3.x Cookie Authentication changes
861 -----------------------------------
862 0.3.0 introduces cookie authentication - you will need to copy the
863 interfaces.py file from the roundup source to your instance home to enable
864 authentication. If you used the classic schema, the interfaces file is in::
866  <roundup source>/roundup/templates/classic/interfaces.py
868 If you used the extended schema, the file is in::
870  <roundup source>/roundup/templates/extended/interfaces.py
872 If you have modified your interfaces.Client class, you will need to take
873 note of the login/logout functionality provided in roundup.cgi_client.Client
874 (classic schema) or roundup.cgi_client.ExtendedClient (extended schema) and
875 modify your instance code apropriately.
878 0.3.x Password encoding
879 -----------------------
880 This release also introduces encoding of passwords in the database. If you
881 have not edited the dbinit.py file in your instance home directory, you may
882 simply copy the new dbinit.py file from the core code. If you used the
883 classic schema, the interfaces file is in::
885  <roundup source>/roundup/templates/classic/dbinit.py
887 If you used the extended schema, the file is in::
889  <roundup source>/roundup/templates/extended/dbinit.py
892 If you have modified your dbinit.py file, you may use encoded passwords:
894 1. Edit the dbinit.py file in your instance home directory
895    a. At the first code line of the open() function::
897        from roundup.hyperdb import String, Date, Link, Multilink
899       alter to include Password, as so::
901        from roundup.hyperdb import String, Password, Date, Link, Multilink
903    b. Where the password property is defined (around line 66)::
905        user = Class(db, "user", 
906                        username=String(),   password=String(),
907                        address=String(),    realname=String(), 
908                        phone=String(),      organisation=String())
909        user.setkey("username")
911       alter the "password=String()" to "password=Password()"::
913        user = Class(db, "user", 
914                        username=String(),   password=Password(),
915                        address=String(),    realname=String(), 
916                        phone=String(),      organisation=String())
917        user.setkey("username")
919 2. Any existing passwords in the database will remain cleartext until they
920    are edited. It is recommended that at a minimum the admin password be
921    changed immediately::
923       roundup-admin -i <instance home> set user1 password=<new password>
926 0.3.x Configuration
927 -------------------
928 FILTER_POSITION, ANONYMOUS_ACCESS, ANONYMOUS_REGISTER have been added to
929 the instance_config.py. Simplest solution is to copy the default values from
930 template in the core source.
932 MESSAGES_TO_AUTHOR has been added to the IssueClass in dbinit.py. Set to 'yes'
933 to send nosy messages to the author. Default behaviour is to not send nosy
934 messages to the author. You will need to add MESSAGES_TO_AUTHOR to your
935 dbinit.py in your instance home.
938 0.3.x CGI script roundup.cgi
939 ----------------------------
940 There have been some structural changes to the roundup.cgi script - you will
941 need to install it again from the cgi-bin directory of the source
942 distribution. Make sure you update the ROUNDUP_INSTANCE_HOMES after the
943 copy.
946 .. _`customisation documentation`: customizing.html
947 .. _`security documentation`: security.html
948 .. _`administration guide`: admin.html