Defect #3690

Status change info duplicates on the issue screen

Added by Vitaly Klimov over 8 years ago. Updated over 7 years ago.

Status:ClosedStart date:2009-07-29
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:1.0.0 (RC)
Resolution:Fixed Affected version:

Description

After upgrade to r2819 i got this strange behavior - all the status/priority changes are displayed twice on the issue screen. For example if i changed status from New to Resolved there would be two identical lines under Updated by: Status changed from New to Resolved. In the email notifications all is normal and reported only once.

Journal_Detail_Duplicate.jpg (76.1 KB) Nanda P, 2010-02-23 20:48

RedMine_History_Duplicate.jpg (29.7 KB) Nanda P, 2010-02-28 17:10

Associated revisions

Revision 3499
Added by Jean-Philippe Lang over 7 years ago

Fixed: journal details duplicated when an issue is saved twice (#3690).

History

#1 Updated by Jean-Philippe Lang over 8 years ago

I'm not able to reproduce. Please read SubmittingBugs and make sure to test without any Redmine plugins installed.

#2 Updated by Rob Aldred over 8 years ago

I get this same issue.
I have done some more investigation... it's only when RAILS_ENV is set to production.
I'm running with passenger with RAILS_ENV set to development the duplication of journal entries no longer happens. weird.

#3 Updated by Vitaly Klimov over 8 years ago

It seems that the journal gets recorded twice only with the plugin Issues Group installed. Without it everything looks normal, so i guess that there is some incompatibility with this plugin.

#4 Updated by Vitaly Klimov over 8 years ago

After further investigation i found out that after_save procedure for class Issue (create_journal) called twice if Issues Group plugin installed. I tried following workaround:

  • commented out after_save
  • did the callback in C++ style
  def save(*args)
     super
     create_journal
  end

this way everything works as it should be.

To me it seems like some bug in Rails interpreter itself but i am new to Ruby and Rails so it is just guess

#5 Updated by Vitaly Klimov over 8 years ago

Small changes to the code to favor args and return value

def save(*args)
  value = super(*args)
  create_journal
  return value
end

#6 Updated by Rob Aldred over 8 years ago

is this going to redmine trunk?

#7 Updated by Rob Aldred over 8 years ago

great work btw :)

#8 Updated by Roland Discein about 8 years ago

Jean-Philippe Lang wrote:

I'm not able to reproduce. Please read SubmittingBugs and make sure to test without any Redmine plugins installed.

respect, because they believe the community have to patch redmine sources instead of patching plugins. the solution posted below destroys ability to post issue changes via email.

#9 Updated by Nanda P over 7 years ago

Same issue

Redmine 0.9.2.devel.3474 (MySQL)

#10 Updated by Jean-Philippe Lang over 7 years ago

  • Status changed from New to Closed
  • Target version set to 1.0.0 (RC)
  • Resolution set to Fixed

This is fixed in r3499.
Saving an issue twice won't duplicate change details any more.

#11 Updated by Nanda P over 7 years ago

Still the same issue. :(

Redmine 0.9.3.devel.3514 (MySQL)

#12 Updated by Nanda P over 7 years ago

#13 Updated by Jean-Philippe Lang over 7 years ago

The fix is not retroactive, it won't remove existing duplicates from your database.
Did the last issue update that I see on your screenshot occur after you upgraded to r3499?

#14 Updated by Nanda P over 7 years ago

Yes, I am getting the duplicate issue after upgrading to latest revision (Redmine 0.9.3.devel.3514 (MySQL) )

I understand it won't remove existing duplicates from the database

#15 Updated by Vitaly Klimov over 7 years ago

Do you have Issues Group plugin installed? In my case this was related to Issue Groups plugin - it seems that Rails somehow mixes up callbacks chain for after_save for patched issue model.

#16 Updated by Nanda P over 7 years ago

C:\Program Files\redmine\current>ruby script\about
About your application's environment
Ruby version              1.8.6 (i386-mswin32)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Application root          C:/Program Files/redmine/current
Environment               development
Database adapter          mysql
Database schema version   20100221100219

About your Redmine plugins
Redmine Reports plugin               0.1.0
Charts Plugin                        0.0.14
Redmine Blogs plugin                 0.0.4
Timesheet Plugin                     0.5.0
Redmine Question plugin              0.3.0
Stuff To Do Plugin                   0.3.0
Bulk Time Entry                      0.4.0
ezFAQ plugin                         0.3.3
Redmine Exception Handler plugin     0.2.0
Redmine Graphs plugin                0.1.0
Redmine Task Board plugin            1.0.0
Redmine System Notification plugin   0.2.0
Tab Plugin                           0.3.1

C:\Program Files\redmine\current>

#17 Updated by Vitaly Klimov over 7 years ago

Well, try to removing plugins one by one starting with those who patch redmine core (just move their folders to the other location) and see if at some moment in time dups will disappear. Or just remove all of the plugins and check it on the clean redmine.

#18 Updated by Nanda P over 7 years ago

  • I Removed all plugins & still having the same issue. :(
C:\Program Files\redmine\current>ruby script/about
About your application's environment
Ruby version              1.8.6 (i386-mswin32)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Application root          C:/Program Files/redmine/current
Environment               development
Database adapter          mysql
Database schema version   20100221100219
Plugins

No data to display

#19 Updated by Nanda P over 7 years ago

Redmine 0.9.3.devel.3521 (MySQL)

#20 Updated by Jean-Philippe Lang over 7 years ago

Nanda, I'm really not able to reproduce this behaviour so please try with a fresh checkout.
I'll have to close this ticket if it can't be reproduced.

#21 Updated by Nanda P over 7 years ago

Jean:

I tried with a fresh checkout(New database), duplication issue is gone. I think there was something wrong with the database.

You can close this issue.

Thank you,
Nanda

#22 Updated by Jean-Philippe Lang over 7 years ago

  • Status changed from Reopened to Closed

Thanks for the feedback. But I don't think there's something wrong with your database. You just need a fresh source.

Also available in: Atom PDF