This trac plugin lets you create comments which are only visible for users with a special permission. To create such a comment you are able to check a new checkbox on the ticket page. If you leave the checkbox unchecked everybody can see the comment.
After installation of this plugin you will be prompted to update your trac environment.
Then you are able to set the name of the permission (default is PRIVATE_COMMENT_PERMISSION) in the admin-interface or in the trac.ini
You have to give this permission to all groups and users who should see the private comments.
If you want to change the color of the "this comment is private"- message you can do this by adding a css-class named "private_comment_marker" to your css.
The label of the checkbox is modifiable via the css-class "private_comment_checkbox".
Old comments can't be set private because they miss an entry in the private_comment table.
I created a script which creates the necessary entries in the private_comment table. Just place the script cpce.py into your trac context and run it
Email notifcations are not filtered and, as far as I know, can't be filtered via a plugin. To filter the notifications I made some minor core changes. If a comment is private the text 'the ticket is processed internally' will be set as comment text.
You can install the filtering by using the notification_patch.patch file from svn.
If you have any issues, create a new ticket.
Download the zipped source from here.
How to add a private comment:
How a user with the permission sees the comment:
How a user without the permission sees the comment:
- Changed license to BSD 3-Clause with permission of author.
- Changed plugin name to CamelCase.
(0.4dev) Convert tabs to spaces in upgrade script, and made some PEP-0008 and Trac coding convention changes.
(0.4dev) PEP-0008 and Trac coding convention changes.
core patch for 0.12.5
- add_a_comment.png (5.0 kB) -
How to create a private comment, added by mhenke on 07/01/10 10:49:01.
- view_comment_w_permission.png (5.7 kB) -
How a user with the special permission sees a private comment, added by mhenke on 07/01/10 10:51:05.
- view_comment_wo_permission.png (1.7 kB) -
How a user without the special permission sees a private comment, added by mhenke on 07/01/10 10:51:29.