ChiliProject is not maintained anymore. Please be advised that there will be no more updates.
We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.
Notification Mail for Wiki-Changes has wrong Diff (Bug #593)
Description
Notification Mail for Wiki-Changes does not show the latest change, but the one before that
Associated revisions
[#593] Generate wiki content notifications in the JournalObserver
This will prevent the usage of the wrong wiki_content status.
The code is not overly pretty and deserves a thorough refactoring, but at
least it solves the problem at hand.
[#593] Generate wiki content notifications in the JournalObserver - backported for 2.7
This will prevent the usage of the wrong wiki_content status.
The code is not overly pretty and deserves a thorough refactoring, but at
least it solves the problem at hand.
History
Updated by Felix Schäfer at 2011-09-10 10:37 am
So this one is tricky because of how the new journals work: on update, the update to the wiki_content gets stored but the version is not yet incremented, the journal for the change gets created, and the wiki_content is passed the version change by the journal creation, which triggers another update for the wiki_content. This means on each update of a wiki_content, the WikiContentObserver#after_update
source:/app/models/wiki_content_observer.rb#L19 is called twice, and to mitigate that a mail is only set if the text of the wiki_content has been changed, which is the case the first time it is saved but not the second time when merely the version is incremented. This means though, that when mail-sending is triggered, the version isn't incremented yet!
Not sure how to best solve this yet.
- Target version set to 2.3.0
Updated by Felix Schäfer at 2011-09-10 11:11 am
The best way would be to change the observer for wiki_contents to observe wiki_content_journals, thoughts?
Updated by Felix Schäfer at 2011-10-03 10:05 am
Postponing this as the source:/app/models/journal_observer.rb is ugly and brittle in so many way I don't want to touch it for now…
- Target version changed from 2.3.0 to 2.4.0
Updated by Felix Schäfer at 2011-10-29 04:34 pm
I have to postpone this again, sorry.
- Target version changed from 2.4.0 to 3.0.0
Updated by Guillaume Bourque at 2011-11-15 02:46 pm
Hi,
So for now is there a simple way to desactivated the diff in the outgoing mail and only sent the notification ?
Thanks.
Updated by Felix Schäfer at 2011-11-16 09:34 am
Other than meddling with the code no, sorry.
Updated by Guillaume Bourque at 2011-11-16 04:19 pm
Felix Schäfer wrote:
Other than meddling with the code no, sorry.
Hello Felix thanks for the info but I tought somewhere in the config that we could select to send the diff or not ... but I can't remember where !
I'm sure that the diff were not sent with my older ChiliProject version 1.2 but now that I'm at 2.4 it's a new feature that I can't disable ?
Thanks again for bringing this great product.
Guillaume.
Updated by Felix Schäfer at 2011-11-16 07:11 pm
Guillaume Bourque wrote:
Felix Schäfer wrote:
Other than meddling with the code no, sorry.
Hello Felix thanks for the info but I tought somewhere in the config that we could select to send the diff or not ... but I can't remember where !
You can choose whether a wiki edit sends emails at all or not in the global administration under administration > settings > e-mail (or something like that), but not if the diff should be included in the mail a wiki edit "sends".
Updated by Eric Davis at 2011-11-25 10:09 am
I have some private code that includes the diff of wiki changes in an email. I can try to get it cleaned up but there are some security implications with it (sending diff of a wiki page with confidential information via email in plain text).
Updated by Holger Just at 2011-11-25 10:55 am
Eric Davis wrote:
but there are some security implications with it (sending diff of a wiki page with confidential information via email in plain text).
We already do that with issues and about everything. So I think we aren't better or worse than before. To mitigate this threat, we should probably investigate in how mails can be encrypted (e.g. by GPG or S/MIME). That feature would require the sending of individual mails though.
Updated by Holger Just at 2012-02-06 01:56 pm
Pull request at https://github.com/chiliproject/chiliproject/pull/150
- Target version changed from 3.0.0 to 2.7.0
- Category changed from Wikis to Journals / History
- Status changed from Open to Ready for review
Updated by Holger Just at 2012-02-06 10:15 pm
- Status changed from Ready for review to Closed