#2839 closed enhancement (wontfix)
require username, comment when changing stuff
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | wiki system | Version: | 0.9.3 |
Severity: | minor | Keywords: | tracobject author comment |
Cc: | joramagten@…, leho@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
when editing a wiki page, roadmap, timeline, … require an author and comment
this to force users to add comments when committing I edited the function save in source:trunk/trac/wiki/model.py
def save(self, author, comment, remote_addr, t=None, db=None): ... if t is None: t = time.time() if author == None or author == "" : raise TracError('Author field is empty') if comment == None or comment == "" : raise TracError('Comment field is empty') if self.text != self.old_text: cursor = db.cursor() ...
also in source:/trunk/templates/wiki.cs " (optional)" should be removed
248 <div class="field"> 249 <label>Comment about this change (optional):<br /> 250 <input id="comment" type="text" name="comment" size="60" value="<?cs 251 var:wiki.comment?>" /></label> 252 </div><br />
- maybe this should better be done with an option in the config file
- it might also be better to handle this in the POST processing of the form and color the field RED?
Attachments (1)
Change History (10)
comment:1 by , 19 years ago
Priority: | normal → low |
---|---|
Severity: | normal → minor |
Type: | defect → enhancement |
comment:2 by , 19 years ago
you're right, this is not a defect at all, sorry about that
that's also an interesting option, can you share the Javascript with us? thanks in advance
by , 19 years ago
Attachment: | confirm-wiki.patch added |
---|
Javascript to prompt the user about comment-less wiki page update
comment:3 by , 19 years ago
Sample of a Javascript add-on that:
- hides the wiki page Save button if the user has not previewed her changes
- prompts the user if she attempts to save the changes without adding a comment
comment:4 by , 19 years ago
Keywords: | tracobject added |
---|---|
Milestone: | → 1.0 |
Owner: | changed from | to
A IWikiManipulator
anyone?
The work Alec did for tickets could be leveraged here for wiki pages.
comment:5 by , 16 years ago
We used this patch for a long time. Now, after switching to 0.11 we missed it. We usually use a minimum comment length of 5 chars to remind users not to forget the comment.
I'm working on a patch for 0.11.n.
- variable name: [wiki] min_wiki_comment_size
The functionality should be implemented easily by a patch similar to #7065. Adding a new init variable in the [wiki] section and adding a few lines as in wiki/web_ui.py (see [7465]).
What I do not know is how to change the line depending on the init variable ("Comment about this change (optional)").
I would appreciate to have one of the following comments:
- if min_wiki_comment_size == 0: "Comment about this change (optional)".
- if min_wiki_comment_size > 0: "Comment about this change (mandatory, min. X characters)".
follow-up: 7 comment:6 by , 16 years ago
This should be a plugin. The IWikiManipulator
(and similar manipulators for other modules) is there just for that reason - so that plugins can implement logic to verifify and possibly veto any create/update event. The plugin can implement any rule for whatever purpose - as for instance used by SpamFilter.
I suggest we close this as wontfix
.
comment:7 by , 15 years ago
Component: | general → wiki system |
---|---|
Milestone: | 1.0 |
Resolution: | → wontfix |
Status: | new → closed |
Replying to osimons:
I suggest we close this as
wontfix
.
My personal take is that you have to educate the users anyway, otherwise even if you enforce comments, all you'll get will be some informative "did some changes" comments if the user is not convinced by the need to record the reasons for the change.
This "education" can be simply showing to the user the difference in page history, one with informative comments, the other without, and let him figure which one is the most useful.
Having the wiki blame feature would be yet another selling point (provided we would have that feature, of course ;-) ).
comment:8 by , 15 years ago
I'll just post here what I posted in #8654 (somewhat of a duplicate) in case someone stumbles across here looking to implement this.
There is a ForceCommentPlugin on Trac-Hacks that forces a user to enter a comment. There is also a ForcePreviewPlugin that applies to both wiki pages and tickets.
comment:9 by , 10 years ago
Cc: | added |
---|
At best, this could be defined as an option.
I personally use a Javacript to pop out a question to the user whether he's sure he wants to commit a new version of a wiki page without a comment.
(changing the ticket type: this is not a defect)