Tracker customization help
Richard Feltstykket <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <20160901171838.GG12191@odinseye> |
Hi list,
My goal is to have the ability to specify different classes of messages
which have different actions. For example, I would like to support a
msg list which would not be emailed to the nosy list (or at least, not
everyone on the list, which I would like to fix later)
To start I have added this to schema.py:
comment = FileClass(db, "comment",
author=Link("user", do_journal='no'),
recipients=Multilink("user", do_journal='no'),
date=Date(),
summary=String(),
files=Multilink("file"),
messageid=String(),
inreplyto=String())
and added this to the IssueClass:
issue = IssueClass(db, "issue",
assignedto=Link("user"),
keyword=Multilink("keyword"),
priority=Link("priority"),
status=Link("status"),
comments=Multilink("comment"))
then, to issue.item.html I have added an additional table:
<table class="messages" tal:condition="context/comments">
<tr><th colspan="4" class="header" i18n:translate="">Comments</th></tr>
<tal:block tal:repeat="comment context/comments/reverse">
<tr>
<th><a tal:attributes="href string:comments${comment/id}"
i18n:translate="">comment<tal:x replace="comment/id" i18n:name="id"
/> (view)</a></th>
<th i18n:translate="">Author: <tal:x replace="comment/author"
i18n:name="author" /></th>
<th i18n:translate="">Date: <tal:x replace="comment/date"
i18n:name="date" /></th>
<th>
<form style="padding:0" method="POST"
tal:condition="context/is_edit_ok"
tal:attributes="action string:issue${context/id}">
<input type="hidden" name="@remove@comments" tal:attributes="value
comment/id">
<input type="hidden" name="@action" value="edit">
<input type="submit" value="remove" i18n:attributes="value">
</form>
</th>
</tr>
<tr>
<td colspan="4" class="content">
<pre tal:content="structure
comment/content/hyperlinked">content</pre>
</td>
</tr>
</tal:block>
</table>
However, I am unclear on how to now put a new comment in this structure,
I was looking at Change Note:
<tr tal:condition="context/is_edit_ok">
<th i18n:translate="">Change Note</th>
<td colspan=3>
<textarea tal:content="request/form/@note/value | default"
name="@note" wrap="hard" rows="5" cols="80"></textarea>
</td>
</tr>
Which doesn't seem to touch msg at all. What's the best way to add
content to this new class from the web interface?
I was also considering modifying the message class itself and adding a
type to it, and then checking the type in the nosy email detector?
Perhaps this is a better strategy? If so, how to do that from the
current change note form?
Thanks for the help!
Richard
------------------------------------------------------------------------------
_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
signature.asc
(application/pgp-signature, 473 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXyGLuAAoJEJO81r3fDHGUciMH/1NDtpMsvjHTVUVPDRRlVVe6 2hQfjq9e1WWBrQON1Ms+J/p42C0ibJs3q4XKYuAa0zLZ+T0ofJ04623rXmP26v1H 30DzyxCcJMnrU2VVFwYOY3GURPdoDHjFz+COf1rWl4cg+1R5vmXlXRk5h+lE1Alb 9XEoPNiCX72LqyUPIOhQcBz3nDu5drF/LHsu60eylW1OOlsQKXfUqXuVVb4S3OBk NQrQZTRQEB+yapSF0RbJ8sJ2HdNkqqUz/KUQW1el1vZa7HI0tHslSdCzIVvUpAdl cQ0IikuTQz317WhRo5QLu7mtdLDqfJyW6GVelritJRKnx4PFzGfA1/gwMD1BdQA= =7a+z -----END PGP SIGNATURE-----