Code

Adding a new reactor, for supporting Internet Explorer's kludge in not
[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::
13 Migrating from 0.7 to 0.8
14 =========================
17 0.8.0 Added filereactor detector
18 --------------------------------
20 This reactor is not installed by default, but rather can be found in the source
21 directory, under the detectors/ directory.
23 In it, it contains a workaround for an Internet Explorer limitation, regarding
24 .eml and .mht files. It is tested to work with both Internet Explorer 6 and
25 Mozilla's Firefox. 
27 Read the description inside of the reactor itself, for more information.
30 0.8.0 Added Dispatcher role
31 ---------------------------
33 A new config option has been added. There is a 'role' that can be filled, 
34 that of the 'dispatcher'. This person acts as a central sentinel for issues
35 coming into the system. You can configure it so that all e-mail error messages
36 get bounced to them, them and the user in question, or just the user (default).
38 To toggle these switches, look at the new classic and minimal config.py's,
39 specifically:
42 # The 'dispatcher' is a role that can get notified of new items to the database.
43 DISPATCHER_EMAIL = ADMIN_EMAIL
45 ...
48 # Send error messages to the dispatcher, user, or both?
49 # If 'dispatcher', error message notifications will only be sent to the dispatcher.
50 # If 'user',       error message notifications will only be sent to the user.
51 # If 'both',       error message notifications will be sent to both individuals.
52 ERROR_MESSAGES_TO = 'user'
54 Migrating from 0.6 to 0.7
55 =========================
57 0.7.0 Added CSV export action
58 -----------------------------
60 A new action has been added which exports the current index page or search
61 result as a comma-separated-value (CSV) file.
63 To use it, add this to your "index" templates:
65 <a tal:attributes="href python:request.indexargs_url('issue',
66             {'@action':'csv_export'})">Download as CSV</a>
68 Making sure that the ``'issue'`` part matches the class name of the page
69 you're editing.
72 0.7.0 Typed columns in MySQL backend
73 ------------------------------------
75 The MySQL (and Postgresql for that matter) backend now creates tables with
76 appropriate column datatypes (not just varchar).
78 Your database will be automatically migrated to use the new schemas, but
79 it will take time. It's probably a good idea to make sure you do this as
80 part of the upgrade when users are not expected to be using the system.
83 0.7.0 Permission setup
84 ----------------------
86 0.7 automatically sets up the Edit and View Permissions for all classes,
87 thus you don't need to do so. Feel free to remove the code::
89     # Add new Permissions for this schema
90     for cl in 'issue', 'file', 'msg', 'user', 'query', 'keyword':
91         db.security.addPermission(name="Edit", klass=cl,
92             description="User is allowed to edit "+cl)
93         db.security.addPermission(name="View", klass=cl,
94             description="User is allowed to access "+cl)
96 from your ``dbinit.py``.
99 0.7.0 Permission assignments
100 ----------------------------
102 Due to a change in the rendering of web widgets, permissions are now
103 checked on Classes where they previously weren't (this is a good thing).
105 You will need to add some additional Permission assignments for your
106 regular users, or some displays will break. After the following in your 
107 tracker's ``dbinit.py``::
109     # Assign the access and edit Permissions for issue, file and message
110     # to regular users now
111     for cl in 'issue', 'file', 'msg', 'query', 'keyword':
112         p = db.security.getPermission('View', cl)
113         db.security.addPermissionToRole('User', p)
114         p = db.security.getPermission('Edit', cl)
115         db.security.addPermissionToRole('User', p)
117 add::
119     for cl in 'priority', 'status':
120         p = db.security.getPermission('View', cl)
121         db.security.addPermissionToRole('User', p)
124 0.7.0 New "actor" property
125 --------------------------
127 Roundup's database has a new per-item property "actor" which reflects the
128 user performing the last "actvitiy". See the classic template for ways to
129 integrate this new property into your interface.
131 The property will be automatically added to your existing database.
134 0.7.0 Extending the cgi interface
135 ---------------------------------
137 Before 0.7.0 adding or extending web actions was done by overriding or adding
138 methods on the Client class. Though this approach still works to provide
139 backwards compatibility, it is recommended you upgrade to the new approach, as
140 described in the `Defining new web actions`__ section of the customization
141 documentation. You might also want to take a look at the `Using an external
142 password validation source`__ example.
144 __ customizing.html#defining-new-web-actions
145 __ customizing.html#using-an-external-password-validation-source
148 0.7.0 Getting the current user id
149 ---------------------------------
151 Removed Database.curuserid attribute. Any code referencing this attribute
152 should be replaced with a call to Database.getuid().
155 0.7.0 Email character set
156 -------------------------
158 The default character set for sending email is UTF-8 (ie. Unicode). If you
159 have users whose email clients can't handle UTF-8 (eg. Eudora) then you
160 will need to edit the new config.py variable ``EMAIL_CHARSET``.
163 0.7.0 ZRoundup changes
164 ----------------------
166 The templates in your tracker's html directory will need updating if you
167 wish to use ZRoundup. If you've not modified those files (or some of them),
168 you may just copy the new versions from the Roundup source in the
169 templates/classic/html directory.
171 If you have modified the html files, then you'll need to manually edit them
172 to change all occurances of special form variables from using the colon ":"
173 special character to the at "@" special character. That is, variables such
174 as::
176   :action :required :template :remove:messages ...
178 should become:
180   @action @required @template @remove@messages ...
182 Note that ``tal:`` statements are unaffected. So are TAL expression type
183 prefixes such as ``python:`` and ``string:``. Please ask on the
184 roundup-users mailing list for help if you're unsure.
187 Migrating from 0.6.x to 0.6.3
188 =============================
190 0.6.3 Configuration
191 -------------------
193 You will need to copy the file::
195   templates/classic/detectors/__init__.py
197 to your tracker's ``detectors`` directory, replacing the one already there.
198 This fixes a couple of bugs in that file.
202 Migrating from 0.5 to 0.6
203 =========================
206 0.6.0 Configuration
207 -------------------
209 Introduced EMAIL_FROM_TAG config variable. This value is inserted into
210 the From: line of nosy email. If the sending user is "Foo Bar", the
211 From: line is usually::
213      "Foo Bar" <issue_tracker@tracker.example>
215 the EMAIL_FROM_TAG goes inside the "Foo Bar" quotes like so::
217      "Foo Bar EMAIL_FROM_TAG" <issue_tracker@tracker.example>
219 I've altered the mechanism in the detectors __init__.py module so that it
220 doesn't cross-import detectors from other trackers (if you run more than one
221 in a single roundup-server). This change means that you'll need to copy the
222 __init__.py from roundup/templates/classic/detectors/__init__.py to your
223 <tracker home>/detectors/__init__.py. Don't worry, the "classic" __init__ is a
224 one-size-fits-all, so it'll work even if you've added/removed detectors.
226 0.6.0 Templating changes
227 ------------------------
229 The ``user.item`` template (in the tracker home "templates" directory)
230 needs to have the following hidden variable added to its form (between the
231 ``<form...>`` and ``</form>`` tags::
233   <input type="hidden" name=":template" value="item">
236 0.6.0 Form handling changes
237 ---------------------------
239 Roundup's form handling capabilities have been significantly expanded. This
240 should not affect users of 0.5 installations - but if you find you're
241 getting errors from form submissions, please ask for help on the Roundup
242 users mailing list:
244   http://lists.sourceforge.net/lists/listinfo/roundup-users
246 See the customisation doc section on `Form Values`__ for documentation of the
247 new form variables possible.
249 __ customizing.html#form-values
252 0.6.0 Multilingual character set support
253 ----------------------------------------
255 Added internationalization support. This is done via encoding all data
256 stored in roundup database to utf-8 (unicode encoding). To support utf-8 in
257 web interface you should add the folowing line to your tracker's html/page
258 and html/_generic.help files inside <head> tag::
259   
260     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
262 Since latin characters in utf-8 have the same codes as in ASCII table, this
263 modification is optional for users who use only plain latin characters. 
265 After this modification, you will be able to see and enter any world
266 character via web interface. Data received via mail interface also converted
267 to utf-8, however only new messages will be converted. If your roundup
268 database contains some of non-ASCII characters in one of 8-bit encoding,
269 they will not be visible in new unicode environment. Some of such data (e.g.
270 user names, keywords, etc)  can be edited by administrator, the others
271 (e.g. messages' contents) is not editable via web interface. Currently there
272 is no tool for converting such data, the only solution is to close
273 appropriate old issues and create new ones with the same content.
276 0.6.0 User timezone support
277 ---------------------------
279 From version 0.6.0 roundup supports displaying of Date data in user' local
280 timezone if he/she has provided timezone information. To make it possible
281 some modification to tracker's schema and HTML templates are required.
282 First you must add string property 'timezone' to user class in dbinit.py
283 like this::
284   
285     user = Class(db, "user", 
286                     username=String(),   password=Password(),
287                     address=String(),    realname=String(), 
288                     phone=String(),      organisation=String(),
289                     alternate_addresses=String(),
290                     queries=Multilink('query'), roles=String(),
291                     timezone=String())
292   
293 And second - html interface. Add following lines to
294 $TRACKER_HOME/html/user.item template::
295   
296      <tr>
297       <th>Timezone</th>
298       <td tal:content="structure context/timezone/field">timezone</td>
299      </tr>
301 After that all users should be able to provide their timezone information.
302 Timezone should be a positive or negative integer - offset from GMT.
304 After providing timezone, roundup will show all dates values, found in web
305 and mail interfaces in local time. It will also accept any Date info in
306 local time, convert and store it in GMT.
309 0.6.0 Search page structure
310 ---------------------------
312 In order to accomodate query editing the search page has been restructured. If
313 you want to provide your users with query editing, you should update your
314 search page using the macros detailed in the customisation doc section
315 `Searching on categories`__.
317 __ customizing.html#searching-on-categories
319 Also, the url field in the query class no longer starts with a '?'. You'll need
320 to remove this question mark from the url field to support queries. There's
321 a script in the "tools" directory called ``migrate-queries.py`` that should
322 automatically change any existing queries for you. As always, make a backup
323 of your database before running such a script.
326 0.6.0 Notes for metakit backend users
327 -------------------------------------
329 Roundup 0.6.0 introduced searching on ranges of dates and intervals. To
330 support it, some modifications to interval storing routine were made. So if
331 your tracker uses metakit backend and your db schema contains intervals
332 property, searches on that property will not be accurate for db items that
333 was stored before roundup' upgrade. However all new records should be
334 searchable on intervals.
336 It is possible to convert your database to new format: you can export and
337 import back all your data (consult "Migrating backends" in "Maintenance"
338 documentation). After this operation all your interval properties should
339 become searchable.
341 Users of backends others than metakit should not worry about this issue.
344 Migrating from 0.4.x to 0.5.0
345 =============================
347 This has been a fairly major revision of Roundup:
349 1. Brand new, much more powerful, flexible, tasty and nutritious templating.
350    Unfortunately, this means all your current templates are useless. Hopefully
351    the new documentation and examples will be enough to help you make the
352    transition. Please don't hesitate to ask on roundup-users for help (or
353    complete conversions if you're completely stuck)!
354 2. The database backed got a lot more flexible, allowing Metakit and SQL
355    databases! The only decent SQL database implemented at present is sqlite,
356    but others shouldn't be a whole lot more work.
357 3. A brand new, highly flexible and much more robust security system including
358    a system of Permissions, Roles and Role assignments to users. You may now
359    define your own Permissions that may be checked in CGI transactions.
360 4. Journalling has been made less storage-hungry, so has been turned on
361    by default *except* for author, recipient and nosy link/unlink events. You
362    are advised to turn it off in your trackers too.
363 5. We've changed the terminology from "instance" to "tracker", to ease the
364    learning curve/impact for new users.
365 6. Because of the above changes, the tracker configuration has seen some
366    major changes. See below for the details.
368 Please, **back up your database** before you start the migration process. This
369 is as simple as copying the "db" directory and all its contents from your
370 tracker to somewhere safe.
373 0.5.0 Configuration
374 -------------------
376 First up, rename your ``instance_config.py`` file to just ``config.py``.
378 Then edit your tracker's ``__init__.py`` module. It'll currently look
379 like this::
381  from instance_config import *
382  try:
383      from dbinit import *
384  except ImportError:
385      pass # in installdir (probably :)
386  from interfaces import *
388 and it needs to be::
390  import config
391  from dbinit import open, init
392  from interfaces import Client, MailGW
394 Due to the new templating having a top-level ``page`` that defines links for
395 searching, indexes, adding items etc, the following variables are no longer
396 used:
398 - HEADER_INDEX_LINKS
399 - HEADER_ADD_LINKS
400 - HEADER_SEARCH_LINKS
401 - SEARCH_FILTERS
402 - DEFAULT_INDEX
403 - UNASSIGNED_INDEX
404 - USER_INDEX
405 - ISSUE_FILTER
407 The new security implementation will require additions to the dbinit module,
408 but also removes the need for the following tracker config variables:
410 - ANONYMOUS_ACCESS
411 - ANONYMOUS_REGISTER
413 but requires two new variables which define the Roles assigned to users who
414 register through the web and e-mail interfaces:
416 - NEW_WEB_USER_ROLES
417 - NEW_EMAIL_USER_ROLES
419 in both cases, 'User' is a good initial setting. To emulate
420 ``ANONYMOUS_ACCESS='deny'``, remove all "View" Permissions from the
421 "Anonymous" Role. To emulate ``ANONYMOUS_REGISTER='deny'``, remove the "Web
422 Registration" and/or the "Email Registration" Permission from the "Anonymous"
423 Role. See the section on customising security in the `customisation
424 documentation`_ for more information.
426 Finally, the following config variables have been renamed to make more sense:
428 - INSTANCE_HOME -> TRACKER_HOME
429 - INSTANCE_NAME -> TRACKER_NAME
430 - ISSUE_TRACKER_WEB -> TRACKER_WEB
431 - ISSUE_TRACKER_EMAIL -> TRACKER_EMAIL
434 0.5.0 Schema Specification
435 --------------------------
437 0.5.0 Database backend changes
438 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
440 Your select_db module in your tracker has changed a fair bit. Where it used
441 to contain::
443  # WARNING: DO NOT EDIT THIS FILE!!!
444  from roundup.backends.back_anydbm import Database
446 it must now contain::
448  # WARNING: DO NOT EDIT THIS FILE!!!
449  from roundup.backends.back_anydbm import Database, Class, FileClass, IssueClass
451 Yes, I realise the irony of the "DO NOT EDIT THIS FILE" statement :)
452 Note the addition of the Class, FileClass, IssueClass imports. These are very
453 important, as they're going to make the next change work too. You now need to
454 modify the top of the dbinit module in your tracker from::
456  import instance_config
457  from roundup import roundupdb
458  from select_db import Database
460  from roundup.roundupdb import Class, FileClass
462  class Database(roundupdb.Database, select_db.Database):
463      ''' Creates a hybrid database from:
464           . the selected database back-end from select_db
465           . the roundup extensions from roundupdb
466      '''
467      pass
469  class IssueClass(roundupdb.IssueClass):
470      ''' issues need the email information
471      '''
472      pass
474 to::
476  import config
477  from select_db import Database, Class, FileClass, IssueClass
479 Yes, remove the Database and IssueClass definitions and those other imports.
480 They're not needed any more!
482 Look for places in dbinit.py where ``instance_config`` is used too, and
483 rename them ``config``.
486 0.5.0 Journalling changes
487 ~~~~~~~~~~~~~~~~~~~~~~~~~
489 Journalling has been optimised for storage. Journalling of links has been
490 turned back on by default. If your tracker has a large user base, you may wish
491 to turn off journalling of nosy list, message author and message recipient
492 link and unlink events. You do this by adding ``do_journal='no'`` to the Class
493 initialisation in your dbinit. For example, your *msg* class initialisation
494 probably looks like this::
496     msg = FileClass(db, "msg",
497                     author=Link("user"), recipients=Multilink("user"),
498                     date=Date(),         summary=String(),
499                     files=Multilink("file"),
500                     messageid=String(),  inreplyto=String())
502 to turn off journalling of author and recipient link events, add
503 ``do_journal='no'`` to the ``author=Link("user")`` part of the statement,
504 like so::
506     msg = FileClass(db, "msg",
507                     author=Link("user", do_journal='no'),
508                     recipients=Multilink("user", do_journal='no'),
509                     date=Date(),         summary=String(),
510                     files=Multilink("file"),
511                     messageid=String(),  inreplyto=String())
513 Nosy list link event journalling is actually turned off by default now. If you
514 want to turn it on, change to your issue class' nosy list, change its
515 definition from::
517     issue = IssueClass(db, "issue",
518                     assignedto=Link("user"), topic=Multilink("keyword"),
519                     priority=Link("priority"), status=Link("status"))
521 to::
523     issue = IssueClass(db, "issue", nosy=Multilink("user", do_journal='yes'),
524                     assignedto=Link("user"), topic=Multilink("keyword"),
525                     priority=Link("priority"), status=Link("status"))
527 noting that your definition of the nosy Multilink will override the normal one.
530 0.5.0 User schema changes
531 ~~~~~~~~~~~~~~~~~~~~~~~~~
533 Users have two more properties, "queries" and "roles". You'll have something
534 like this in your dbinit module now::
536     user = Class(db, "user",
537                     username=String(),   password=Password(),
538                     address=String(),    realname=String(),
539                     phone=String(),      organisation=String(),
540                     alternate_addresses=String())
541     user.setkey("username")
543 and you'll need to add the new properties and the new "query" class to it
544 like so::
546     query = Class(db, "query",
547                     klass=String(),     name=String(),
548                     url=String())
549     query.setkey("name")
551     # Note: roles is a comma-separated string of Role names
552     user = Class(db, "user",
553                     username=String(),   password=Password(),
554                     address=String(),    realname=String(),
555                     phone=String(),      organisation=String(),
556                     alternate_addresses=String(),
557                     queries=Multilink('query'), roles=String())
558     user.setkey("username")
560 The "queries" property is used to store off the user's favourite database
561 queries. The "roles" property is explained below in `0.5.0 Security
562 Settings`_.
565 0.5.0 Security Settings
566 ~~~~~~~~~~~~~~~~~~~~~~~
568 See the `security documentation`_ for an explanation of how the new security
569 system works. In a nutshell though, the security is handled as a four step
570 process:
572 1. Permissions are defined as having a name and optionally a hyperdb class
573    they're specific to,
574 2. Roles are defined that have one or more Permissions,
575 3. Users are assigned Roles in their "roles" property, and finally
576 4. Roundup checks that users have appropriate Permissions at appropriate times
577    (like editing issues).
579 Your tracker dbinit module's *open* function now has to define any
580 Permissions that are specific to your tracker, and also the assignment
581 of Permissions to Roles. At the moment, your open function
582 ends with::
584     import detectors
585     detectors.init(db)
587     return db
589 and what we need to do is insert some commands that will set up the security
590 parameters. Right above the ``import detectors`` line, you'll want to insert
591 these lines::
593     #
594     # SECURITY SETTINGS
595     #
596     # new permissions for this schema
597     for cl in 'issue', 'file', 'msg', 'user':
598         db.security.addPermission(name="Edit", klass=cl,
599             description="User is allowed to edit "+cl)
600         db.security.addPermission(name="View", klass=cl,
601             description="User is allowed to access "+cl)
603     # Assign the access and edit permissions for issue, file and message
604     # to regular users now
605     for cl in 'issue', 'file', 'msg':
606         p = db.security.getPermission('View', cl)
607         db.security.addPermissionToRole('User', p)
608         p = db.security.getPermission('Edit', cl)
609         db.security.addPermissionToRole('User', p)
610     # and give the regular users access to the web and email interface
611     p = db.security.getPermission('Web Access')
612     db.security.addPermissionToRole('User', p)
613     p = db.security.getPermission('Email Access')
614     db.security.addPermissionToRole('User', p)
616     # May users view other user information? Comment these lines out
617     # if you don't want them to
618     p = db.security.getPermission('View', 'user')
619     db.security.addPermissionToRole('User', p)
621     # Assign the appropriate permissions to the anonymous user's Anonymous
622     # Role. Choices here are:
623     # - Allow anonymous users to register through the web
624     p = db.security.getPermission('Web Registration')
625     db.security.addPermissionToRole('Anonymous', p)
626     # - Allow anonymous (new) users to register through the email gateway
627     p = db.security.getPermission('Email Registration')
628     db.security.addPermissionToRole('Anonymous', p)
629     # - Allow anonymous users access to the "issue" class of data
630     #   Note: this also grants access to related information like files,
631     #         messages, statuses etc that are linked to issues
632     #p = db.security.getPermission('View', 'issue')
633     #db.security.addPermissionToRole('Anonymous', p)
634     # - Allow anonymous users access to edit the "issue" class of data
635     #   Note: this also grants access to create related information like
636     #         files and messages etc that are linked to issues
637     #p = db.security.getPermission('Edit', 'issue')
638     #db.security.addPermissionToRole('Anonymous', p)
640     # oh, g'wan, let anonymous access the web interface too
641     p = db.security.getPermission('Web Access')
642     db.security.addPermissionToRole('Anonymous', p)
644 Note in the comments there the places where you might change the permissions
645 to restrict users or grant users more access. If you've created additional
646 classes that users should be able to edit and view, then you should add them
647 to the "new permissions for this schema" section at the start of the security
648 block. Then add them to the "Assign the access and edit permissions" section
649 too, so people actually have the new Permission you've created.
651 One final change is needed that finishes off the security system's
652 initialisation. We need to add a call to ``db.post_init()`` at the end of the
653 dbinit open() function. Add it like this::
655     import detectors
656     detectors.init(db)
658     # schema is set up - run any post-initialisation
659     db.post_init()
660     return db
662 You may verify the setup of Permissions and Roles using the new
663 "``roundup-admin security``" command.
666 0.5.0 User changes
667 ~~~~~~~~~~~~~~~~~~
669 To support all those schema changes, you'll need to massage your user database
670 a little too, to:
672 1. make sure there's an "anonymous" user - this user is mandatory now and is
673    the one that unknown users are logged in as.
674 2. make sure all users have at least one Role.
676 If you don't have the "anonymous" user, create it now with the command::
678   roundup-admin create user username=anonymous roles=Anonymous
680 making sure the capitalisation is the same as above. Once you've done that,
681 you'll need to set the roles property on all users to a reasonable default.
682 The admin user should get "Admin", the anonymous user "Anonymous"
683 and all other users "User". The ``fixroles.py`` script in the tools directory
684 will do this. Run it like so (where python is your python 2+ binary)::
686   python tools/fixroles.py -i <tracker home> fixroles
690 0.5.0 CGI interface changes
691 ---------------------------
693 The CGI interface code was completely reorganised and largely rewritten. The
694 end result is that this section of your tracker interfaces module will need
695 changing from::
697  from roundup import cgi_client, mailgw
698  from roundup.i18n import _
699  
700  class Client(cgi_client.Client):
701      ''' derives basic CGI implementation from the standard module,
702          with any specific extensions
703      '''
704      pass
706 to::
708  from roundup import mailgw
709  from roundup.cgi import client
710  
711  class Client(client.Client): 
712      ''' derives basic CGI implementation from the standard module,
713          with any specific extensions
714      '''
715      pass
717 You will also need to install the new version of roundup.cgi from the source
718 cgi-bin directory if you're using it.
721 0.5.0 HTML templating
722 ---------------------
724 You'll want to make a backup of your current tracker html directory. You
725 should then copy the html directory from the Roundup source "classic" template
726 and modify it according to your local schema changes.
728 If you need help with the new templating system, please ask questions on the
729 roundup-users mailing list (available through the roundup project page on
730 sourceforge, http://roundup.sf.net/)
733 0.5.0 Detectors
734 ---------------
736 The nosy reactor has been updated to handle the tracker not having an
737 "assignedto" property on issues. You may want to copy it into your tracker's
738 detectors directory. Chances are you've already fixed it though :)
741 Migrating from 0.4.1 to 0.4.2
742 =============================
744 0.4.2 Configuration
745 -------------------
746 The USER_INDEX definition introduced in 0.4.1 was too restrictive in its
747 allowing replacement of 'assignedto' with the user's userid. Users must change
748 the None value of 'assignedto' to 'CURRENT USER' (the string, in quotes) for
749 the replacement behaviour to occur now.
751 The new configuration variables are:
753 - EMAIL_KEEP_QUOTED_TEXT 
754 - EMAIL_LEAVE_BODY_UNCHANGED
755 - ADD_RECIPIENTS_TO_NOSY
757 See the sample configuration files in::
759  <roundup source>/roundup/templates/classic/instance_config.py
761 and::
763  <roundup source>/roundup/templates/extended/instance_config.py
765 and the `customisation documentation`_ for information on how they're used.
768 0.4.2 Changes to detectors
769 --------------------------
770 You will need to copy the detectors from the distribution into your instance
771 home "detectors" directory. If you used the classic schema, the detectors
772 are in::
774  <roundup source>/roundup/templates/classic/detectors/
776 If you used the extended schema, the detectors are in::
778  <roundup source>/roundup/templates/extended/detectors/
780 The change means that schema-specific code has been removed from the
781 mail gateway and cgi interface and made into auditors:
783 - nosyreactor.py has now got an updatenosy auditor which updates the nosy
784   list with author, recipient and assignedto information.
785 - statusauditor.py makes the unread or resolved -> chatting changes and
786   presets the status of an issue to unread.
788 There's also a bug or two fixed in the nosyreactor code.
790 0.4.2 HTML templating changes
791 -----------------------------
792 The link() htmltemplate function now has a "showid" option for links and
793 multilinks. When true, it only displays the linked item id as the anchor
794 text. The link value is displayed as a tooltip using the title anchor
795 attribute. To use in eg. the superseder field, have something like this::
797    <td>
798     <display call="field('superseder', showid=1)">
799     <display call="classhelp('issue', 'id,title', label='list', width=500)">
800     <property name="superseder">
801      <br>View: <display call="link('superseder', showid=1)">
802     </property>
803    </td>
805 The stylesheets have been cleaned up too. You may want to use the newer
806 versions in::
808  <roundup source>/roundup/templates/<template>/html/default.css
812 Migrating from 0.4.0 to 0.4.1
813 =============================
815 0.4.1 Files storage
816 -------------------
818 Messages and files from newly created issues will be put into subdierectories
819 in thousands e.g. msg123 will be put into files/msg/0/msg123, file2003
820 will go into files/file/2/file2003. Previous messages are still found, but
821 could be put into this structure.
823 0.4.1 Configuration
824 -------------------
826 To allow more fine-grained access control, the variable used to check
827 permission to auto-register users in the mail gateway is now called
828 ANONYMOUS_REGISTER_MAIL rather than overloading ANONYMOUS_REGISTER. If the
829 variable doesn't exist, then ANONYMOUS_REGISTER is tested as before.
831 Configuring the links in the web header is now easier too. The following
832 variables have been added to the classic instance_config.py::
834   HEADER_INDEX_LINKS   - defines the "index" links to be made available
835   HEADER_ADD_LINKS     - defines the "add" links
836   DEFAULT_INDEX        - specifies the index view for DEFAULT
837   UNASSIGNED_INDEX     - specifies the index view for UNASSIGNED
838   USER_INDEX           - specifies the index view for USER
840 See the <roundup source>/roundup/templates/classic/instance_config.py for more
841 information - including how the variables are to be set up. Most users will
842 just be able to copy the variables from the source to their instance home. If
843 you've modified the header by changing the source of the interfaces.py file in
844 the instance home, you'll need to remove that customisation and move it into
845 the appropriate variables in instance_config.py.
847 The extended schema has similar variables added too - see the source for more
848 info.
850 0.4.1 Alternate E-Mail Addresses
851 --------------------------------
853 If you add the property "alternate_addresses" to your user class, your users
854 will be able to register alternate email addresses that they may use to
855 communicate with roundup as. All email from roundup will continue to be sent
856 to their primary address.
858 If you have not edited the dbinit.py file in your instance home directory,
859 you may simply copy the new dbinit.py file from the core code. If you used
860 the classic schema, the interfaces file is in::
862  <roundup source>/roundup/templates/classic/dbinit.py
864 If you used the extended schema, the file is in::
866  <roundup source>/roundup/templates/extended/dbinit.py 
868 If you have modified your dbinit.py file, you need to edit the dbinit.py
869 file in your instance home directory. Find the lines which define the user
870 class::
872     user = Class(db, "msg",
873                     username=String(),   password=Password(),
874                     address=String(),    realname=String(), 
875                     phone=String(),      organisation=String(),
876                     alternate_addresses=String())
878 You will also want to add the property to the user's details page. The
879 template for this is the "user.item" file in your instance home "html"
880 directory. Similar to above, you may copy the file from the roundup source if
881 you haven't modified it. Otherwise, add the following to the template::
883    <display call="multiline('alternate_addresses')">
885 with appropriate labelling etc. See the standard template for an idea.
889 Migrating from 0.3.x to 0.4.0
890 =============================
892 0.4.0 Message-ID and In-Reply-To addition
893 -----------------------------------------
894 0.4.0 adds the tracking of messages by message-id and allows threading
895 using in-reply-to. Most e-mail clients support threading using this
896 feature, and we hope to add support for it to the web gateway. If you
897 have not edited the dbinit.py file in your instance home directory, you may
898 simply copy the new dbinit.py file from the core code. If you used the
899 classic schema, the interfaces file is in::
901  <roundup source>/roundup/templates/classic/dbinit.py
903 If you used the extended schema, the file is in::
905  <roundup source>/roundup/templates/extended/dbinit.py 
907 If you have modified your dbinit.py file, you need to edit the dbinit.py
908 file in your instance home directory. Find the lines which define the msg
909 class::
911     msg = FileClass(db, "msg",
912                     author=Link("user"), recipients=Multilink("user"),
913                     date=Date(),         summary=String(),
914                     files=Multilink("file"))
916 and add the messageid and inreplyto properties like so::
918     msg = FileClass(db, "msg",
919                     author=Link("user"), recipients=Multilink("user"),
920                     date=Date(),         summary=String(),
921                     files=Multilink("file"),
922                     messageid=String(),  inreplyto=String())
924 Also, configuration is being cleaned up. This means that your dbinit.py will
925 also need to be changed in the open function. If you haven't changed your
926 dbinit.py, the above copy will be enough. If you have, you'll need to change
927 the line (round line 50)::
929     db = Database(instance_config.DATABASE, name)
931 to::
933     db = Database(instance_config, name)
936 0.4.0 Configuration
937 --------------------
938 ``TRACKER_NAME`` and ``EMAIL_SIGNATURE_POSITION`` have been added to the
939 instance_config.py. The simplest solution is to copy the default values
940 from template in the core source.
942 The mail gateway now checks ``ANONYMOUS_REGISTER`` to see if unknown users
943 are to be automatically registered with the tracker. If it is set to "deny"
944 then unknown users will not have access. If it is set to "allow" they will be
945 automatically registered with the tracker.
948 0.4.0 CGI script roundup.cgi
949 ----------------------------
950 The CGI script has been updated with some features and a bugfix, so you should
951 copy it from the roundup cgi-bin source directory again. Make sure you update
952 the ROUNDUP_INSTANCE_HOMES after the copy.
955 0.4.0 Nosy reactor
956 ------------------
957 The nosy reactor has also changed - copy the nosyreactor.py file from the core
958 source::
960    <roundup source>/roundup/templates/<template>/detectors/nosyreactor.py
962 to your instance home "detectors" directory.
965 0.4.0 HTML templating
966 ---------------------
967 The field() function was incorrectly implemented - links and multilinks now
968 display as text fields when rendered using field(). To display a menu (drop-
969 down or select box) you need to use the menu() function.
973 Migrating from 0.2.x to 0.3.x
974 =============================
976 0.3.x Cookie Authentication changes
977 -----------------------------------
978 0.3.0 introduces cookie authentication - you will need to copy the
979 interfaces.py file from the roundup source to your instance home to enable
980 authentication. If you used the classic schema, the interfaces file is in::
982  <roundup source>/roundup/templates/classic/interfaces.py
984 If you used the extended schema, the file is in::
986  <roundup source>/roundup/templates/extended/interfaces.py
988 If you have modified your interfaces.Client class, you will need to take
989 note of the login/logout functionality provided in roundup.cgi_client.Client
990 (classic schema) or roundup.cgi_client.ExtendedClient (extended schema) and
991 modify your instance code apropriately.
994 0.3.x Password encoding
995 -----------------------
996 This release also introduces encoding of passwords in the database. If you
997 have not edited the dbinit.py file in your instance home directory, you may
998 simply copy the new dbinit.py file from the core code. If you used the
999 classic schema, the interfaces file is in::
1001  <roundup source>/roundup/templates/classic/dbinit.py
1003 If you used the extended schema, the file is in::
1005  <roundup source>/roundup/templates/extended/dbinit.py
1008 If you have modified your dbinit.py file, you may use encoded passwords:
1010 1. Edit the dbinit.py file in your instance home directory
1011    a. At the first code line of the open() function::
1013        from roundup.hyperdb import String, Date, Link, Multilink
1015       alter to include Password, as so::
1017        from roundup.hyperdb import String, Password, Date, Link, Multilink
1019    b. Where the password property is defined (around line 66)::
1021        user = Class(db, "user", 
1022                        username=String(),   password=String(),
1023                        address=String(),    realname=String(), 
1024                        phone=String(),      organisation=String())
1025        user.setkey("username")
1027       alter the "password=String()" to "password=Password()"::
1029        user = Class(db, "user", 
1030                        username=String(),   password=Password(),
1031                        address=String(),    realname=String(), 
1032                        phone=String(),      organisation=String())
1033        user.setkey("username")
1035 2. Any existing passwords in the database will remain cleartext until they
1036    are edited. It is recommended that at a minimum the admin password be
1037    changed immediately::
1039       roundup-admin -i <instance home> set user1 password=<new password>
1042 0.3.x Configuration
1043 -------------------
1044 FILTER_POSITION, ANONYMOUS_ACCESS, ANONYMOUS_REGISTER have been added to
1045 the instance_config.py. Simplest solution is to copy the default values from
1046 template in the core source.
1048 MESSAGES_TO_AUTHOR has been added to the IssueClass in dbinit.py. Set to 'yes'
1049 to send nosy messages to the author. Default behaviour is to not send nosy
1050 messages to the author. You will need to add MESSAGES_TO_AUTHOR to your
1051 dbinit.py in your instance home.
1054 0.3.x CGI script roundup.cgi
1055 ----------------------------
1056 There have been some structural changes to the roundup.cgi script - you will
1057 need to install it again from the cgi-bin directory of the source
1058 distribution. Make sure you update the ROUNDUP_INSTANCE_HOMES after the
1059 copy.
1062 .. _`customisation documentation`: customizing.html
1063 .. _`security documentation`: security.html
1064 .. _`administration guide`: admin.html