Skip to content

Commit c9c9a21

Browse files
author
Justus Pendleton
committed
retire "topic" usage
"Topic" still appears in the locale files. I'm sure we need to support that for existing trackers. I *think* they don't care about any of the other changes that have been made. I also left Ka-Ping Yee's original design document unchanged. This takes care of sf feature request [SF#953161]
1 parent fff8712 commit c9c9a21

File tree

13 files changed

+94
-95
lines changed

13 files changed

+94
-95
lines changed

doc/customizing.txt

Lines changed: 49 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Customising Roundup
33
===================
44

5-
:Version: $Revision: 1.220 $
5+
:Version: $Revision: 1.221 $
66

77
.. This document borrows from the ZopeBook section on ZPT. The original is at:
88
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -445,7 +445,7 @@ specifying (default) labelling and ordering of classes.)::
445445

446446
file = FileClass(db, "file", name=String())
447447

448-
issue = IssueClass(db, "issue", topic=Multilink("keyword"),
448+
issue = IssueClass(db, "issue", keyword=Multilink("keyword"),
449449
status=Link("status"), assignedto=Link("user"),
450450
priority=Link("priority"))
451451
issue.setkey('title')
@@ -2481,10 +2481,10 @@ An index view specifier (URL fragment) looks like this (whitespace has
24812481
been added for clarity)::
24822482

24832483
/issue?status=unread,in-progress,resolved&
2484-
topic=security,ui&
2484+
keyword=security,ui&
24852485
@group=priority,-status&
24862486
@sort=-activity&
2487-
@filters=status,topic&
2487+
@filters=status,keyword&
24882488
@columns=title,status,fixer
24892489

24902490
The index view is determined by two parts of the specifier: the layout
@@ -2503,11 +2503,11 @@ of items with values matching any specified Multilink properties.
25032503

25042504
The example specifies an index of "issue" items. Only items with a
25052505
"status" of either "unread" or "in-progress" or "resolved" are
2506-
displayed, and only items with "topic" values including both "security"
2506+
displayed, and only items with "keyword" values including both "security"
25072507
and "ui" are displayed. The items are grouped by priority arranged in
25082508
ascending order and in descending order by status; and within
25092509
groups, sorted by activity, arranged in descending order. The filter
2510-
section shows filters for the "status" and "topic" properties, and the
2510+
section shows filters for the "status" and "keyword" properties, and the
25112511
table includes columns for the "title", "status", and "fixer"
25122512
properties.
25132513

@@ -2904,7 +2904,7 @@ caches the schema).
29042904
1. Modify the ``schema.py``::
29052905

29062906
issue = IssueClass(db, "issue",
2907-
assignedto=Link("user"), topic=Multilink("keyword"),
2907+
assignedto=Link("user"), keyword=Multilink("keyword"),
29082908
priority=Link("priority"), status=Link("status"),
29092909
due_date=Date())
29102910

@@ -3398,7 +3398,7 @@ be able to give a summary of the total time spent on a particular issue.
33983398
``schema.py``)::
33993399

34003400
issue = IssueClass(db, "issue",
3401-
assignedto=Link("user"), topic=Multilink("keyword"),
3401+
assignedto=Link("user"), keyword=Multilink("keyword"),
34023402
priority=Link("priority"), status=Link("status"),
34033403
times=Multilink("timelog"))
34043404

@@ -3571,7 +3571,7 @@ a system support issue class to a tracker.
35713571

35723572
# store issues related to those systems
35733573
support = IssueClass(db, "support",
3574-
assignedto=Link("user"), topic=Multilink("keyword"),
3574+
assignedto=Link("user"), keyword=Multilink("keyword"),
35753575
status=Link("status"), deadline=Date(),
35763576
affects=Multilink("system"))
35773577

@@ -4055,14 +4055,14 @@ resolved. To achieve this:
40554055
this class in your tracker's ``schema.py`` file. Change this::
40564056

40574057
issue = IssueClass(db, "issue",
4058-
assignedto=Link("user"), topic=Multilink("keyword"),
4058+
assignedto=Link("user"), keyword=Multilink("keyword"),
40594059
priority=Link("priority"), status=Link("status"))
40604060

40614061
to this, adding the blockers entry::
40624062

40634063
issue = IssueClass(db, "issue",
40644064
blockers=Multilink("issue"),
4065-
assignedto=Link("user"), topic=Multilink("keyword"),
4065+
assignedto=Link("user"), keyword=Multilink("keyword"),
40664066
priority=Link("priority"), status=Link("status"))
40674067

40684068
2. Add the new ``blockers`` property to the ``issue.item.html`` edit
@@ -4204,33 +4204,32 @@ on it (i.e. it's in their blockers list) you can look at the journal
42044204
history at the bottom of the issue page - look for a "link" event to
42054205
another issue's "blockers" property.
42064206

4207-
Add users to the nosy list based on the topic
4208-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4207+
Add users to the nosy list based on the keyword
4208+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42094209

42104210
Let's say we need the ability to automatically add users to the nosy
42114211
list based
4212-
on the occurance of a topic. Every user should be allowed to edit their
4213-
own list of topics for which they want to be added to the nosy list.
4212+
on the occurance of a keyword. Every user should be allowed to edit their
4213+
own list of keywords for which they want to be added to the nosy list.
42144214

42154215
Below, we'll show that this change can be done with minimal
42164216
understanding of the Roundup system, using only copy and paste.
42174217

42184218
This requires three changes to the tracker: a change in the database to
4219-
allow per-user recording of the lists of topics for which he wants to
4219+
allow per-user recording of the lists of keywords for which he wants to
42204220
be put on the nosy list, a change in the user view allowing them to edit
4221-
this list of topics, and addition of an auditor which updates the nosy
4222-
list when a topic is set.
4221+
this list of keywords, and addition of an auditor which updates the nosy
4222+
list when a keyword is set.
42234223

4224-
Adding the nosy topic list
4225-
::::::::::::::::::::::::::
4224+
Adding the nosy keyword list
4225+
::::::::::::::::::::::::::::
42264226

4227-
The change to make in the database, is that for any user there should be
4228-
a list of topics for which he wants to be put on the nosy list. Adding
4229-
a ``Multilink`` of ``keyword`` seems to fullfill this (note that within
4230-
the code, topics are called ``keywords``.) As such, all that has to be
4231-
done is to add a new field to the definition of ``user`` within the
4232-
file ``schema.py``. We will call this new field ``nosy_keywords``, and
4233-
the updated definition of user will be::
4227+
The change to make in the database, is that for any user there should be a list
4228+
of keywords for which he wants to be put on the nosy list. Adding a
4229+
``Multilink`` of ``keyword`` seems to fullfill this. As such, all that has to
4230+
be done is to add a new field to the definition of ``user`` within the file
4231+
``schema.py``. We will call this new field ``nosy_keywords``, and the updated
4232+
definition of user will be::
42344233

42354234
user = Class(db, "user",
42364235
username=String(), password=Password(),
@@ -4241,22 +4240,22 @@ the updated definition of user will be::
42414240
timezone=String(),
42424241
nosy_keywords=Multilink('keyword'))
42434242

4244-
Changing the user view to allow changing the nosy topic list
4245-
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
4243+
Changing the user view to allow changing the nosy keyword list
4244+
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
42464245

4247-
We want any user to be able to change the list of topics for which
4246+
We want any user to be able to change the list of keywords for which
42484247
he will by default be added to the nosy list. We choose to add this
42494248
to the user view, as is generated by the file ``html/user.item.html``.
42504249
We can easily
4251-
see that the topic field in the issue view has very similar editing
4252-
requirements as our nosy topics, both being lists of topics. As
4253-
such, we look for Topics in ``issue.item.html``, and extract the
4250+
see that the keyword field in the issue view has very similar editing
4251+
requirements as our nosy keywords, both being lists of keywords. As
4252+
such, we look for Keywords in ``issue.item.html``, and extract the
42544253
associated parts from there. We add this to ``user.item.html`` at the
42554254
bottom of the list of viewed items (i.e. just below the 'Alternate
42564255
E-mail addresses' in the classic template)::
42574256

42584257
<tr>
4259-
<th>Nosy Topics</th>
4258+
<th>Nosy Keywords</th>
42604259
<td>
42614260
<span tal:replace="structure context/nosy_keywords/field" />
42624261
<span tal:replace="structure python:db.keyword.classhelp(property='nosy_keywords')" />
@@ -4269,7 +4268,7 @@ Addition of an auditor to update the nosy list
42694268

42704269
The more difficult part is the logic to add
42714270
the users to the nosy list when required.
4272-
We choose to perform this action whenever the topics on an
4271+
We choose to perform this action whenever the keywords on an
42734272
item are set (this includes the creation of items).
42744273
Here we choose to start out with a copy of the
42754274
``detectors/nosyreaction.py`` detector, which we copy to the file
@@ -4290,16 +4289,16 @@ functionality is left in the new auditor. The following block of
42904289
code, which handled adding the assignedto user(s) to the nosy list in
42914290
``updatenosy``, should be replaced by a block of code to add the
42924291
interested users to the nosy list. We choose here to loop over all
4293-
new topics, than looping over all users,
4294-
and assign the user to the nosy list when the topic occurs in the user's
4292+
new keywords, than looping over all users,
4293+
and assign the user to the nosy list when the keyword occurs in the user's
42954294
``nosy_keywords``. The next part in ``updatenosy`` -- adding the author
42964295
and/or recipients of a message to the nosy list -- is obviously not
42974296
relevant here and is thus deleted from the new auditor. The last
42984297
part, copying the new nosy list to ``newvalues``, can stay as is.
42994298
This results in the following function::
43004299

43014300
def update_kw_nosy(db, cl, nodeid, newvalues):
4302-
'''Update the nosy list for changes to the topics
4301+
'''Update the nosy list for changes to the keywords
43034302
'''
43044303
# nodeid will be None if this is a new node
43054304
current = {}
@@ -4324,17 +4323,17 @@ This results in the following function::
43244323
if not current.has_key(value):
43254324
current[value] = 1
43264325

4327-
# add users with topic in nosy_keywords to the nosy list
4328-
if newvalues.has_key('topic') and newvalues['topic'] is not None:
4329-
topic_ids = newvalues['topic']
4330-
for topic in topic_ids:
4326+
# add users with keyword in nosy_keywords to the nosy list
4327+
if newvalues.has_key('keyword') and newvalues['keyword'] is not None:
4328+
keyword_ids = newvalues['keyword']
4329+
for keyword in keyword_ids:
43314330
# loop over all users,
4332-
# and assign user to nosy when topic in nosy_keywords
4331+
# and assign user to nosy when keyword in nosy_keywords
43334332
for user_id in db.user.list():
43344333
nosy_kw = db.user.get(user_id, "nosy_keywords")
43354334
found = 0
43364335
for kw in nosy_kw:
4337-
if kw == topic:
4336+
if kw == keyword:
43384337
found = 1
43394338
if found:
43404339
current[user_id] = 1
@@ -4354,10 +4353,10 @@ A few problems with the design here can be noted:
43544353
Multiple additions
43554354
When a user, after automatic selection, is manually removed
43564355
from the nosy list, he is added to the nosy list again when the
4357-
topic list of the issue is updated. A better design might be
4358-
to only check which topics are new compared to the old list
4359-
of topics, and only add users when they have indicated
4360-
interest on a new topic.
4356+
keyword list of the issue is updated. A better design might be
4357+
to only check which keywords are new compared to the old list
4358+
of keywords, and only add users when they have indicated
4359+
interest on a new keyword.
43614360

43624361
The code could also be changed to only trigger on the ``create()``
43634362
event, rather than also on the ``set()`` event, thus only setting
@@ -4367,8 +4366,8 @@ Scalability
43674366
In the auditor, there is a loop over all users. For a site with
43684367
only few users this will pose no serious problem; however, with
43694368
many users this will be a serious performance bottleneck.
4370-
A way out would be to link from the topics to the users who
4371-
selected these topics as nosy topics. This will eliminate the
4369+
A way out would be to link from the keywords to the users who
4370+
selected these keywords as nosy keywords. This will eliminate the
43724371
loop over all users.
43734372

43744373
Changes to Security and Permissions

doc/design.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ software bug tracker. The database is set up like this::
819819
Class(db, "keyword", name=hyperdb.String())
820820

821821
Class(db, "issue", fixer=hyperdb.Multilink("user"),
822-
topic=hyperdb.Multilink("keyword"),
822+
keyword=hyperdb.Multilink("keyword"),
823823
priority=hyperdb.Link("priority"),
824824
status=hyperdb.Link("status"))
825825

@@ -1250,10 +1250,10 @@ An index view specifier looks like this (whitespace has been added for
12501250
clarity)::
12511251

12521252
/issue?status=unread,in-progress,resolved&
1253-
topic=security,ui&
1253+
keyword=security,ui&
12541254
:group=priority,-status&
12551255
:sort=-activity&
1256-
:filters=status,topic&
1256+
:filters=status,keyword&
12571257
:columns=title,status,fixer
12581258

12591259

@@ -1274,11 +1274,11 @@ of issues with values matching any specified Multilink properties.
12741274

12751275
The example specifies an index of "issue" items. Only issues with a
12761276
"status" of either "unread" or "in-progres" or "resolved" are displayed,
1277-
and only issues with "topic" values including both "security" and "ui"
1277+
and only issues with "keyword" values including both "security" and "ui"
12781278
are displayed. The items are grouped by priority arranged in ascending
12791279
order and in descending order by status; and within groups, sorted by
12801280
activity, arranged in descending order. The filter section shows
1281-
filters for the "status" and "topic" properties, and the table includes
1281+
filters for the "status" and "keyword" properties, and the table includes
12821282
columns for the "title", "status", and "fixer" properties.
12831283

12841284
Associated with each issue class is a default layout specifier. The

doc/overview.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ or to fit it into a rigid hierarchy. Yet things
147147
only sometimes fall into one category; often,
148148
a piece of information may be related to several concepts.
149149

150-
For example, forcing each item into a single topic
150+
For example, forcing each item into a single keyword
151151
category is not just suboptimal but counterproductive:
152152
seekers of that
153153
item may expect to find it in a different category
@@ -245,7 +245,7 @@ possessing the property to the item representing the chosen option.
245245
The *multilink* type is for a list of links to any
246246
number of other items in the in the database. A *multilink*
247247
property, for example, can be used to refer to related items
248-
or topic categories relevant to an item.
248+
or keyword categories relevant to an item.
249249

250250
For Roundup, all items have four properties that are not customizable:
251251

@@ -314,13 +314,13 @@ options make it tougher for someone to make a good choice::
314314
# superseder = Multilink("issue")
315315
# (it also gets the Class properties creation, activity and creator)
316316
issue = IssueClass(db, "issue",
317-
assignedto=Link("user"), topic=Multilink("keyword"),
317+
assignedto=Link("user"), keyword=Multilink("keyword"),
318318
priority=Link("priority"), status=Link("status"))
319319

320320
The **assignedto** property assigns
321321
responsibility for an item to a person or a list of people.
322-
The **topic** property places the
323-
item in an arbitrary number of relevant topic sets (see
322+
The **keyword** property places the
323+
item in an arbitrary number of relevant keyword sets (see
324324
the section on `Browsing and Searching`_).
325325

326326
The **prority** and **status** values are initially:
@@ -449,11 +449,11 @@ look at the mail spool on an item to catch up on any
449449
messages they might have missed.
450450

451451
We can take this a step further and
452-
permit users to monitor particular topics or classifications of items
452+
permit users to monitor particular keywords or classifications of items
453453
by allowing other kinds of items to also have their own nosy lists.
454454
For example, a manager could be on the
455455
nosy list of the priority value item for "critical", or a
456-
developer could be on the nosy list of the topic value item for "security".
456+
developer could be on the nosy list of the keyword value item for "security".
457457
The recipients are then determined by the union of the nosy lists on the
458458
item and all the items it links to.
459459

@@ -552,7 +552,7 @@ Each type of property has its own appropriate filtering widget:
552552
(the filter selects the *intersection* of the sets of items
553553
associated with the active options)
554554

555-
For a *multilink* property like **topic**,
555+
For a *multilink* property like **keyword**,
556556
one possibility is to show, as hyperlinks, the keywords whose
557557
sets have non-empty intersections with the currently displayed set of
558558
items. Sorting the keywords by popularity seems

doc/user_guide.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
User Guide
33
==========
44

5-
:Version: $Revision: 1.36 $
5+
:Version: $Revision: 1.37 $
66

77
.. contents::
88

@@ -112,7 +112,7 @@ These fields take a value which indicates "yes"/"no", "true"/"false",
112112
Constrained (link and multilink) properties
113113
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
114114

115-
Fields like "Assigned To" and "Topics" hold references to items in other
115+
Fields like "Assigned To" and "Keywords" hold references to items in other
116116
classes ("user" and "keyword" in those two cases.)
117117

118118
Sometimes, the selection is done through a menu, like in the "Assigned
@@ -130,13 +130,13 @@ not set. For example, the following searches on the issues:
130130
match issues that are not assigned to a user.
131131
``assignedto=2,3,40``
132132
match issues that are assigned to users 2, 3 or 40.
133-
``topic=user interface``
134-
match issues with the keyword "user interface" in their topic list
135-
``topic=web interface,e-mail interface``
133+
``keyword=user interface``
134+
match issues with the keyword "user interface" in their keyword list
135+
``keyword=web interface,e-mail interface``
136136
match issues with the keyword "web interface" or "e-mail interface" in
137-
their topic list
138-
``topic=-1``
139-
match issues with no topics set
137+
their keyword list
138+
``keyword=-1``
139+
match issues with no keywords set
140140

141141

142142
Date properties
@@ -350,10 +350,10 @@ You may manually write URLS that contain these arguments, like so
350350
(whitespace has been added for clarity)::
351351

352352
/issue?status=unread,in-progress,resolved&
353-
topic=security,ui&
353+
keyword=security,ui&
354354
@group=priority,-status&
355355
@sort=-activity&
356-
@filters=status,topic&
356+
@filters=status,keyword&
357357
@columns=title,status,fixer
358358

359359

0 commit comments

Comments
 (0)