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.
Changesets are displaying the wrong user and commit date in the Activity (Bug #474)
Description
When we add an existing SVN repository to a project, the updates are correctly linked to the chili users under repository author column. But when looking at the activities, they are hooked to the wrong user. Under activity, all revisions are linked to one user. The list looks like this:
<Date>
Revision XX: <text>
<Wrong user>
When you click on a activity you get:
Revision XX
Added by <correct user> about <time> ago
<text>
Associated revisions
[#474] Changesets should use the author method for events
This will let them pick up the committer string if user is nil
[#474] aaj should use the Model's activity options for timestamp and author_key
Some models (Changeset) require custom options passed to
acts_as_activity_provider but acts_as_journalized wasn't accepting these
for :timestamp or :author_key
History
Updated by Felix Schäfer at 2011-06-16 07:50 pm
Is this for data that has been migrated (i.e. existed before) or data that's being added to ChiliProject 2.0? If migrated: From Redmine or ChiliProject, and from what version? If newly imported, through what means (cron, autoupdate, …)?
- Assignee set to Dennis Karmelk
- Status changed from Open to Needs more information
Updated by Felix Schäfer at 2011-06-16 09:59 pm
OK, I think I've found the problem: ChangesetJournals
get created with the default user for journals, which is User.current
, which is wrong in most cases.
Updated by Dennis Karmelk at 2011-06-17 07:23 am
No, it's no migration, but a new setup. I've attached some pictures to clarify what goes wrong. To reproduce:
Create a SVN repo or use an existing one.
Make sure there are some commits with two or more users.
Add the svn repo to a new project.
Activities are generated from SVN, all with the user who added the SVN repo.
I have no idea what you say in the last comment, but it sounds like that may be the problem :-)
- File chili2.jpg added
- File chili1.jpg added
Updated by Felix Schäfer at 2011-06-17 08:38 am
Dennis Karmelk wrote:
I have no idea what you say in the last comment, but it sounds like that may be the problem :-)
It probably is, I'm trying to think of a good way to correct the wrong data you currently have in your DB though…
Updated by Felix Schäfer at 2011-06-17 04:44 pm
So the problem is in Changeset.rb
, journals get created with User.current
because the Changeset
journals aren't initialized with the user
of the Changeset
, and the created_at
date of the journal is wrong too, as it defaults to "now" but should be the committed_on
of the journal.
I'm not sure having a journal for the Changeset
s is a good fit though, as they (currently) don't change anyway, or they should be converted to Journal
s altogether, a little like the wiki pages are, though I'm not sure how doable that would be because Changeset has_many :changes
(if those changes are not queried against, then by all means let's get rid of them and dump them into the changes of a journal-based Changeset
).
Updated by Eric Davis at 2011-06-17 05:08 pm
Thanks Felix, I'll try to take a look at this.
- Assignee changed from Dennis Karmelk to Eric Davis
- Status changed from Needs more information to Open
Updated by Eric Davis at 2011-06-17 08:12 pm
I've fixed the activity module for Changesets. What was happening was acts_as_journalized wasn't letting the Changeset model override some options for acts_as_event and acts_as_activity. So it was showing the ChangesetJournal#author instead of the committer and the ChangesetJournal#created_at time instead of the committed_on date.
One thing to watch for: this page is cached using an etag so if the results still don't look correct after upgrading, try to restart your web server (or otherwise clear the etag).
- Subject changed from SVN and activities link broken to Changesets are displaying the wrong user and commit date in the Activity
- Category changed from User accounts to Journals / History
- (deleted custom field) set to unstable
- Status changed from Open to Closed