Code

pre-release stuff
[roundup.git] / MIGRATION.txt
1 Migrating to newer versions of Roundup
2 ======================================
4 Please read each section carefully and edit your instance home files
5 accordingly.
7 This file contains information for users upgrading from:
8   0.3.x -> 0.4.x
9   0.2.x -> 0.3.x
12 Migrating from 0.3.x to 0.4.x
13 =============================
15 Message-ID and In-Reply-To addition
16 -----------------------------------
17 0.4.0 adds the tracking of messages by message-id and allows threading
18 using in-reply-to. Most e-mail clients support threading using this
19 feature, and we hope to add support for it to the web gateway. If you
20 have not edited the dbinit.py file in your instance home directory, you may
21 simply copy the new dbinit.py file from the core code. If you used the
22 classic schema, the interfaces file is in:
24  <roundup source>/roundup/templates/classic/dbinit.py
26 If you used the extended schema, the file is in:
28  <roundup source>/roundup/templates/extended/dbinit.py 
30 If you have modified your dbinit.py file, you need to edit the dbinit.py
31 file in your instance home directory. Find the lines which define the msg
32 class:
34     msg = FileClass(db, "msg",
35                     author=Link("user"), recipients=Multilink("user"),
36                     date=Date(),         summary=String(),
37                     files=Multilink("file"))
39  and add the messageid and inreplyto properties like so:
41     msg = FileClass(db, "msg",
42                     author=Link("user"), recipients=Multilink("user"),
43                     date=Date(),         summary=String(),
44                     files=Multilink("file"),
45                     messageid=String(),  inreplyto=String())
47 Also, configuration is being cleaned up. This means that your dbinit.py will
48 also need to be changed in the open function. If you haven't changed your
49 dbinit.py, the above copy will be enough. If you have, you'll need to change
50 the line (round line 50):
52     db = Database(instance_config.DATABASE, name)
54 to:
56     db = Database(instance_config, name)
59 Configuration
60 -------------
61 INSTANCE_NAME and EMAIL_SIGNATURE_POSITION have been added to the
62 instance_config.py. The simplest solution is to copy the default values
63 from template in the core source.
65 The mail gateway now checks ANONYMOUS_REGISTER to see if unknown users are to
66 be automatically registered with the tracker. If it is set to "deny" then
67 unknown users will not have access. If it is set to "allow" they will be
68 automatically registered with the tracker.
71 CGI script roundup.cgi
72 ----------------------
73 The CGI script has been updated with some features and a bugfix, so you should
74 copy it from the roundup cgi-bin source directory again. Make sure you update
75 the ROUNDUP_INSTANCE_HOMES after the copy.
78 Nosy reactor
79 ------------
80 The nosy reactor has also changed - copy the nosyreactor.py file from the core
81 source roundup/templates/[schema]/detectors/nosyreactor.py to your instance
82 home "detectors" directory.
85 HTML templating
86 ---------------
87 The field() function was incorrectly implemented - links and multilinks now
88 display as text fields when rendered using field(). To display a menu (drop-
89 down or select box) you need to use the menu() function.
93 Migrating from 0.2.x to 0.3.x
94 =============================
96 Cookie Authentication changes
97 -----------------------------
98 0.3.0 introduces cookie authentication - you will need to copy the
99 interfaces.py file from the roundup source to your instance home to enable
100 authentication. If you used the classic schema, the interfaces file is in:
102  <roundup source>/roundup/templates/classic/interfaces.py
104 If you used the extended schema, the file is in:
106  <roundup source>/roundup/templates/extended/interfaces.py
108 If you have modified your interfaces.Client class, you will need to take
109 note of the login/logout functionality provided in roundup.cgi_client.Client
110 (classic schema) or roundup.cgi_client.ExtendedClient (extended schema) and
111 modify your instance code apropriately.
114 Password encoding
115 -----------------
116 This release also introduces encoding of passwords in the database. If you
117 have not edited the dbinit.py file in your instance home directory, you may
118 simply copy the new dbinit.py file from the core code. If you used the
119 classic schema, the interfaces file is in:
121  <roundup source>/roundup/templates/classic/dbinit.py
123 If you used the extended schema, the file is in:
125  <roundup source>/roundup/templates/extended/dbinit.py
128 If you have modified your dbinit.py file, you may use encoded passwords:
130  1. Edit the dbinit.py file in your instance home directory
131  1a. At the first code line of the open() function:
133     from roundup.hyperdb import String, Date, Link, Multilink
135       alter to include Password, as so:
137     from roundup.hyperdb import String, Password, Date, Link, Multilink
139  1b. Where the password property is defined (around line 66):
141     user = Class(db, "user", 
142                     username=String(),   password=String(),
143                     address=String(),    realname=String(), 
144                     phone=String(),      organisation=String())
145     user.setkey("username")
147       alter the "password=String()" to "password=Password()":
149     user = Class(db, "user", 
150                     username=String(),   password=Password(),
151                     address=String(),    realname=String(), 
152                     phone=String(),      organisation=String())
153     user.setkey("username")
155  2. Any existing passwords in the database will remain cleartext until they
156     are edited. It is recommended that at a minimum the admin password be
157     changed immediately:
159       roundup-admin -i <instance home> set user1 password=<new password>
162 Configuration
163 -------------
164 FILTER_POSITION, ANONYMOUS_ACCESS, ANONYMOUS_REGISTER have been added to
165 the instance_config.py. Simplest solution is to copy the default values from
166 template in the core source.
168 MESSAGES_TO_AUTHOR has been added to the IssueClass in dbinit.py. Set to 'yes'
169 to send nosy messages to the author. Default behaviour is to not send nosy
170 messages to the author. You will need to add MESSAGES_TO_AUTHOR to your
171 dbinit.py in your instance home.
174 CGI script roundup.cgi
175 ----------------------
176 There have been some structural changes to the roundup.cgi script - you will
177 need to install it again from the cgi-bin directory of the source
178 distribution. Make sure you update the ROUNDUP_INSTANCE_HOMES after the
179 copy.