Re: Silent submit for issue.item.html
Peter Funk <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <20190224113502.GC7602@pfmaster-P170EM> |
Hello Tom,
Ralf and John P. have already responded to your question.
Nevertheless I want to drop my 2 cents to this:
Tom Ekberg schrieb am Freitag, den 22.02.2019 um 18:16:
> I have a request from one of our tracker users to have 2
> types of submit buttons for issue creation or editing. One
> submit button would write to the database (messages too) and
> do nothing else (silent). The other would work as it does
> now, writing to the database and sending emails using the
> nosy list. I don't see an easy way to do that other than
> have javascript that sets a field (input type="hidden")
> to a value that the detector nosyreaction.py can check.
>
> This seems like a hack. Is there a more elegant way to
> implement a "silent" submit button?
In our company we had a similar requirement and our solution was
to add a new boolean toggle button to the message composition window.
If you want you could use javascript to let this toggle change the
label of the submit button to "silent submit" but that is not
required for functionality.
This new boolean toggle was added as a property to our message class:
http://www.roundup-tracker.org/cgi-bin/moin.cgi/ConfidentialEmail
(originally we implemented this extension with Roundup version 0.8 ☺)
Your requirement of suppressing emails if a boolean toggle
is activated could be implemented very similar: In fact it is
simpler because you don't need a new role attribute for the users
in order to distinguish who should receive an email and who not.
Simply skipping the call to cl.send_message() in nosyreaction.py
would be sufficient like so:
def nosyreaction(db, cl, nodeid, oldvalues):
...
if not messages.get(msgid, 'silent_message'):
...
cl.send_message(nodeid, msgid, note, sendto)
As John P. already pointed out: This new feature could lead to complains
from users that they were not informed (did not receive an email)
about certain actions within an issue. So I recommend a message
list rendering similar to what I described in the Wiki page
mentioned above.
Insert in issue.item.html in the table of messages:
<tr tal:condition="msg/silent_message">
<th class="msgsilent" colspan="3" i18n:translate="">
This silent remark was not send out to members of the nosy list.
</th>
</tr>
and in html/style.css:
table.messages th.msgsilent {
font-weight: bold;
color: red;
border-top: 0;
}
Best regards (in german: Liebe Grüße), Peter Funk
--
Peter Funk ✉:Oldenburger Str.86, D-27777 Ganderkesee; ☎:+49-179-640-8878
office✉: ArtCom GmbH, Haferwende 2, D-28357 Bremen, Germany
☎:+49-421-20419-0 <http://www.artcom-gmbh.de/>
_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
signature.asc
(application/pgp-signature, 173 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iD8DBQFccoFmy0klgkNpN0IRAq3bAJ9uHYy4GJezIsNQTA1Y6HYXJHjrPQCfQR+M 1fMSFo2OZRjWH3MQzttmN1s= =8zZB -----END PGP SIGNATURE-----