zy4 / anonymous_watchers

WIP: try to upgrade this plugin for Redmine 3.x
6 stars 0 forks source link

undefined local variable or method when trying to add Watcher #1

Open MHedlund opened 7 years ago

MHedlund commented 7 years ago

I understand that this project is a WIP, but I still want to report an issue i'm having in hope that you will know the cause: when I click add watcher nothing happens. When debuging

500

undefined local variable or method `watchables' for #<#>:0x00000007145be8>

/gitRepos/redmine/redmine-3.1.5test/plugins/redmine_anonymous_watchers/app/views/watchers/_new.html.erb:1:in `_42595e5afb47e7f0d42084cad0ed2ec2'

Environment: Redmine version 3.1.5.stable Ruby version 2.1.2-p95 (2014-05-08) [x86_64-linux-gnu] Rails version 4.2.5.2 Environment production Database adapter Mysql2 SCM: Git 2.6.4 Filesystem
Redmine plugins: a_common_libs 2.1.8 csv_import_issues 0.0.2 issue_hot_buttons 0.4.4 issue_importer_xls 0.1.3 progressive_projects_list 3.0.1 redmine_backlogs v1.0.6c redmine_base_deface 0.0.1 redmine_bootstrap_kit 0.2.4 redmine_checklists 3.1.3 redmine_custom_workflows 0.1.6 redmine_dashboard 2.7.1 redmine_dmsf 1.5.6 redmine_importer 1.2.2 redmine_issues_tree 0.0.7 redmine_jenkins 1.0.1 redmine_ldap_sync 2.0.7 redmine_maintenance_mode 2.0.1 redmine_multiprojects_issue 0.2 redmine_mylyn_connector 2.8.2.stable redmine_planning 1.0.0 redmine_revision_branches 0.3.1 redmine_spent_time 3.1.2 redmine_spent_time_in_issue_description 2.8.0 redmine_sudo 0.0.1 redmine_workflow_enhancements 0.5.0 redmine_workload 1.0.4b system_notification_plugin 0.3.0 time_logger 0.5.3 usability 2.1.2

MHedlund commented 7 years ago

I set up a docker environment and Installed only this plugin. Redmine version 3.3.2.stable Ruby version 2.1.9-p490 (2016-03-30) [x86_64-linux-gnu] Rails version 4.2.7.1 Environment production Database adapter Mysql2 SCM: Subversion 1.8.8 Darcs 2.8.4 Mercurial 2.8.2 Cvs 1.12.13 Bazaar 2.7.0 Git 2.11.0 Filesystem
Redmine plugins: redmine_anonymous_watchers 0.1.0

If I Click Add in the sidebar of an issue I get the following error `Started GET "/watchers/new?object_id=3&object_type=issue" for 127.0.0.1 at 2017-03-14 12:27:23 +0100 Processing by WatchersController#new as JS Parameters: {"object_id"=>"3", "object_type"=>"issue"} Current user: admin (id=1) Rendered watchers/_new.html.erb (35.7ms) Rendered plugins/redmine_anonymous_watchers/app/views/watchers/_new.html.erb (36.3ms) Rendered watchers/new.js.erb (36.6ms) Completed 500 Internal Server Error in 57ms (ActiveRecord: 3.9ms)

ActionView::Template::Error (undefined local variable or method users' for #<#<Class:0x00000005237008>:0x0000000b9113a0>): 21: :project_id => @project) }')" %> 22: 23: <div id="users_for_watcher"> 24: <%= principals_check_box_tags('watcher[user_ids][]', users) %> 25: </div> 26: 27: <p class="buttons"> app/views/watchers/_new.html.erb:24:inblock in _app_views_watchersnew_html_erb2591710330064069536_42047320' app/views/watchers/_new.html.erb:3:in _app_views_watchers__new_html_erb__2591710330064069536_42047320' plugins/redmine_anonymous_watchers/app/views/watchers/_new.html.erb:1:in_plugins_redmine_anonymous_watchers_app_views_watchersnew_html_erb3983507353984859361_42114180' app/views/watchers/new.js.erb:1:in _app_views_watchers_new_js_erb___2008637796310708811_42416340' lib/redmine/sudo_mode.rb:63:insudo_mode'`

I get another error if I logout and try to watch an issue. Does it exist any way to add a email-adress as watcher?

MHedlund commented 7 years ago

The first error I got was probably due to Redmine changes in Redmine between 3.2 and 3.3 watchers changed to watchables