Defect #38114

Example plugin (extra/sample_plugin) breaks Activity page

Added by Go MAEDA about 1 month ago. Updated 4 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Documentation
Target version:4.2.10
Resolution:Fixed Affected version:

Description

If you install Example Plugin, it breaks Activity Page.

From what I have found, this problem already exists in Redmine 3.4 (I have not checked Redmine 3.3 or earlier versions).

$ cp -a extra/sample_plugin plugins/
$ bin/rake db:migrate redmine:plugins:migrate RAILS_ENV=test
$ bin/rails test test/functional/activities_controller_test.rb
Run options: --seed 46703

# Running:

..DEPRECATION WARNING: acts_as_activity_provider with implicit :scope option is deprecated. Please pass a scope on the Meeting as a proc. (called from block (2 levels) in events at /Users/maeda/redmines/redmine-trunk/lib/redmine/activity/fetcher.rb:93)
E

Error:
ActivitiesControllerTest#test_global_index:
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: projects.status
    lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb:90:in `find_events'
    lib/redmine/activity/fetcher.rb:93:in `block (2 levels) in events'
    lib/redmine/activity/fetcher.rb:92:in `each'
    lib/redmine/activity/fetcher.rb:92:in `block in events'
    lib/redmine/activity/fetcher.rb:91:in `each'
    lib/redmine/activity/fetcher.rb:91:in `events'
    app/controllers/activities_controller.rb:62:in `index'
    lib/redmine/sudo_mode.rb:61:in `sudo_mode'
    test/functional/activities_controller_test.rb:70:in `test_global_index'

rails test test/functional/activities_controller_test.rb:68

sample_plugin.patch Magnifier (604 Bytes) Karel Pičman, 2023-01-26 16:31

Associated revisions

Revision 22079
Added by Go MAEDA 5 days ago

Fix that Example plugin (extra/sample_plugin) breaks Activity page (#38114).

Patch by Karel Pičman.

Revision 22080
Added by Go MAEDA 4 days ago

Merged r22079 from trunk to 5.0-stable (#38114).

Revision 22081
Added by Go MAEDA 4 days ago

Merged r22079 from trunk to 4.2-stable (#38114).

History

#1 Updated by Karel Pičman 6 days ago

This patch should fix it.

#2 Updated by Go MAEDA 5 days ago

  • Target version set to 4.2.10

Karel Pičman wrote:

This patch should fix it.

Thank you, I have confirmed that the patch fixes the issue.

Setting the target version to 4.2.10.

#3 Updated by Go MAEDA 5 days ago

  • Subject changed from Example plugin (extra/sample_plugin) does not wok to Example plugin (extra/sample_plugin) breaks Activity page
  • Status changed from New to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you for your contribution.

#4 Updated by Go MAEDA 4 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF