Project

General

Profile

Actions

Defect #3725

closed

Model Issue is getting spoiled

Added by Dmitri Kouikoff over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Plugin API
Target version:
-
Start date:
2009-08-10
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

$ mysql --help
mysql Ver 14.12 Distrib 5.0.67, for slackware-linux-gnu (i486) using EditLine wrapper

$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]

rails 2.2.2

redmine #2835

When I add the plugin (see the attachment) the model Issue works well only on the first request after the server (webrick) is restarted.
See, what /xml/work_pieces gives back. Some comments can be found in vendor/plugins/redmine_client/app/views/xml/work_pieces/index.html.erb.


Files

redmine_client.diff.gz (4.93 KB) redmine_client.diff.gz Dmitri Kouikoff, 2009-08-10 17:07
Actions #1

Updated by Eric Davis over 14 years ago

  • Status changed from New to Closed
  • Assignee deleted (Jean-Philippe Lang)
  • Resolution set to Invalid

Please use the Forums to ask for plugin help. The issue tracker is only for the Redmine core. You are probably experiencing a similar problem I wrote about at http://theadmin.org/articles/2009/4/13/how-to-modify-core-redmine-classes-from-a-plugin

Actions #2

Updated by Dmitri Kouikoff over 14 years ago

  • Status changed from Closed to Reopened
  • Assignee set to Eric Davis

Thank you for the information. Indeed in the production mode everything works OK.
But the receipt given does not help the development mode to work.

1. The effect firstly had place when I had all the changes placed in the core code.
2. I thought it may be connected with that new associations are in the plugin, so I've extracted the extra code into the plugin and use Dispatcher.to_prepare to include it.

In particular, I've added a new association to the Issue

  base.send :has_many, :work_pieces, :dependent => :destroy

WorkPiece model and WorkPiecesController are quite new introduced in the plugin. For the index method in the veiw I have
    <td><%= Issue.instance_methods.size %></td>
    <td><%= work_piece.issue.class.instance_methods.size %></td>

The both numbers are the same only at the first request in the development mode: 432. Starting from the second request the latter number becomes 248.

Can you help to fix the problem?

Actions #3

Updated by Eric Davis over 14 years ago

  • Status changed from Reopened to Closed
  • Assignee deleted (Eric Davis)

Please use the forums for asking for development help on plugins.

Actions

Also available in: Atom PDF