Skip to content

Commit a218743

Browse files
committed
merge from upstream
2 parents 39a8887 + b015be8 commit a218743

File tree

7 files changed

+104
-20
lines changed

7 files changed

+104
-20
lines changed

CHANGES.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,12 @@ Fixed:
252252
parts to this: 1) changes to the templates to properly define the
253253
__came_from form element. See ``upgrading.txt``. 2) code changes
254254
to the LoginAction code in roundup/cgi/actions.py. (John Rouillard)
255+
- issue2550648 - partial fix for problem in this issue. Ezio Melotti
256+
reported that the expression editor allowed the user to generate an
257+
expression using retired values. To align the expression editor with
258+
the simple dropdown search item, retired values are now removed from
259+
the expression editor. (We have an open question as to whether this
260+
is desirable.)
255261

256262
2016-01-11: 1.5.1
257263

doc/FAQ.txt

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,17 @@ to::
161161

162162
for more information, go and read about Zope Page Templates.
163163

164+
I want to link version identifiers from my messages to svn/mercurial/git
165+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
166+
167+
See: the LinkFormatingExample at:
168+
169+
http://www.roundup-tracker.org/cgi-bin/moin.cgi/LinkFormattingExample?highlight=%28local%5C_replace%29
170+
171+
There are examples in the devel and responsive templates. Search for
172+
LocalReplace to find the extension file and the change that has to be
173+
made to the item template.
174+
164175

165176
Using Roundup
166177
-------------
@@ -204,5 +215,36 @@ Note that if an "order" property is defined on a Class that is used for
204215
sorting, all items of that Class *must* have a value against the "order"
205216
property, or sorting will result in random ordering.
206217

218+
219+
How do I filter roundup emails?
220+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
221+
222+
When roundup emails users, it provides an email header::
223+
224+
X-Roundup-(class)-(property): values
225+
226+
for every property that is a link or multilink (usually things
227+
set by a dropdown or selection in the web interface).
228+
229+
For example, assume you have a category field for issues in your tracker.
230+
You respond to issues that fall into the catagories: Network and Security.
231+
232+
You will see headers like:
233+
234+
X-Roundup-issue-category: Network
235+
236+
or
237+
238+
X-Roundup-issue-category: Network, Security, Linux
239+
240+
Then you can set up a filter looking for X-Roundup-issue-category
241+
followed by Network or Security in your mail program. Directions on
242+
using your mail program ae beyond the scope of theis FAQ entry.
243+
244+
(If you don't see a header for a multilink or link property, look for
245+
msg_header_property in the roundup docs. In some cases you have to
246+
explicitly enable the header.)
247+
248+
207249
.. _`customisation`: customizing.html
208250

doc/customizing.txt

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -685,26 +685,65 @@ behaviour:
685685
(like, e.g., product codes). For these roundup needs to match the
686686
numeric name and should never match an ID. In this case you can set
687687
``try_id_parsing='no'``.
688-
- The ``msg_header_property`` is used in the mail gateway when sending
689-
out messages: By default roundup creates headers of the form::
688+
- The ``msg_header_property`` is used by the mail gateway when sending
689+
out messages. When a link or multilink property of an issue changes,
690+
roundup creates email headers of the form::
690691

691692
X-Roundup-issue-prop: value
692693

693-
for all properties prop of issue that have a ``name`` property. This
694-
definition allows to override the name of the property used for
695-
generating headers. A common use-case is adding a mail-header with
696-
the ``assigned_to`` property to allow user mail-filtering of
697-
issue-emails for which they're responsible. In that case setting::
694+
where ``value`` is the ``name`` property for the linked item(s).
695+
For example, if you have a multilink for attached_files in your
696+
issue, you will see a header::
697+
698+
X-Roundup-issue-attached_files: MySpecialFile.doc, HisResume.txt
699+
700+
when the class for attached files is defined as::
701+
702+
file = FileClass(db, "file",
703+
name=String())
704+
705+
``MySpecialFile.doc`` is the name for the file object.
706+
707+
If you have an ``assigned_to`` property in your issue class that
708+
links to the user class and you want to add a header::
709+
710+
X-Roundup-issue-assigned_to: ...
711+
712+
so that the mail recipients can filter emails where
713+
``X-Roundup-issue-assigned_to: name`` that contains their
714+
username. The user class is defined as::
715+
716+
user = Class(db, "user",
717+
username=String(),
718+
password=Password(),
719+
address=String(),
720+
realname=String(),
721+
phone=String(),
722+
organisation=String(),
723+
alternate_addresses=String(),
724+
queries=Multilink('query'),
725+
roles=String(), # comma-separated string of Role names
726+
timezone=String())
727+
728+
Because there is no ``name`` parameter for the user class, there
729+
will be no header. However setting::
730+
731+
assigned_to=Link("user", msg_header_property="username")
732+
733+
will make the mail gateway generate an ``X-Roundup-issue-assigned_to``
734+
using the username property of the linked user.
735+
736+
Assume assigned_to for an issue is linked to the user with
737+
username=joe_user, setting::
698738

699739
msg_header_property="username"
700740

701741
for the assigned_to property will generated message headers of the
702742
form::
703-
743+
704744
X-Roundup-issue-assigned_to: joe_user
705745

706-
for issues where joe_user is the username of the person
707-
responsible for this issue.
746+
for emails sent on issues where joe_user has been assigned to the issue.
708747

709748
If this property is set to the empty string "", it will prevent
710749
the header from being generated on outgoing mail.

roundup/cgi/KeywordsExpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def list_nodes(request):
245245
prop = request.form.getfirst("property")
246246
cls = request.client.db.getclass(prop)
247247
items = []
248-
for nodeid in cls.getnodeids():
248+
for nodeid in cls.getnodeids(retired=0):
249249
l = cls.getnode(nodeid).items()
250250
l = dict([x for x in l if len(x) == 2])
251251
try:

share/roundup/templates/devel/html/bug.item.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,21 +176,21 @@
176176
<tr tal:condition="context/is_edit_ok">
177177
<th><tal:block i18n:translate="">Patch</tal:block>:</th>
178178
<td colspan="3">
179-
<input type="hidden" name="@link@patches" value="patches-1"/>
180-
<input type="file" name="patches-1@content" size="35"/>
179+
<input type="hidden" name="@link@patches" value="patch-1"/>
180+
<input type="file" name="patch-1@content" size="35"/>
181181
</td>
182182
</tr>
183183
<tr tal:condition="context/is_edit_ok">
184184
<th><tal:block i18n:translate="">Patch Description</tal:block>:</th>
185-
<td colspan=3><input type="edit" name="patches-1@description" size="40"></td>
185+
<td colspan=3><input type="edit" name="patch-1@description" size="40"></td>
186186
</tr>
187187
<tr tal:condition="context/is_edit_ok">
188188
<th><tal:block i18n:translate="">Repository</tal:block>:</th>
189-
<td colspan=3><input type="edit" name="patches-1@repository" size="40"></td>
189+
<td colspan=3><input type="edit" name="patch-1@repository" size="40"></td>
190190
</tr>
191191
<tr tal:condition="context/is_edit_ok">
192192
<th><tal:block i18n:translate="">Repo. Revision</tal:block>:</th>
193-
<td colspan=3><input type="edit" name="patches-1@revision" size="40"></td>
193+
<td colspan=3><input type="edit" name="patch-1@revision" size="40"></td>
194194
</tr>
195195
-->
196196
</table>
@@ -322,4 +322,3 @@
322322
</td>
323323

324324
</tal:block>
325-
<!-- SHA: b8f7d44a12ed641c457adebd68b1e0eab5369e7c -->

share/roundup/templates/devel/html/page.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ <h1><a href="/">Roundup Demo Tracker</a></h1>
144144
'status': milestone_status_notclosed,
145145
'@dispname': i18n.gettext('Show Open'),
146146
'@startwith': 0,
147-
'@group': 'status',
148147
})"
149148
i18n:translate="">Show Open</a>
150149
</li>
@@ -430,4 +429,3 @@ <h1 id="breadcrumb"><span metal:define-slot="body_title">body title</span></h1>
430429
<input metal:define-macro="user_confirm_input" type="password"
431430
tal:attributes="id name; name string:@confirm@$name; readonly not:edit_ok" value=""/>
432431

433-
<!-- SHA: ca32e5f43efcb7c3b4940df6f7a176f6990b15f0 -->

share/roundup/templates/devel/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
description=String(indexme='yes'))
127127

128128
# Patch
129-
patches = FileClass(db, "patches",
129+
patch = FileClass(db, "patch",
130130
name=String(),
131131
description=String(indexme='yes'),
132132
repository=String(),

0 commit comments

Comments
 (0)