Git Product home page Git Product logo

redmine_default_custom_query's Introduction

Redmine Default Custom Query Gitter

Build Status Code Climate

Redmine plugin for setting the default custom query of Issues for each project.

Configure the default query per projects

Apply the default query

Usage

  1. Enable the Default Custom Query module in your project
  2. Select a custom query to set to default in setting for your project

Supported versions

  • Redmine 4.0
  • Ruby 2.2, 2.3, 2.4, 2.5, 2.6

Install

git clone or copy an unarchived plugin(archived file is here) to plugins/redmine_default_custom_query on your Redmine path.

$ git clone https://github.com/hidakatsuya/redmine_default_custom_query.git /path/to/your-redmine/plugins/redmine_default_custom_query

Install dependencies:

$ bundle install

Then, migrate:

$ cd /path/to/your-redmine
$ rake redmine:plugins:migrate NAME=redmine_default_custom_query RAILS_ENV=production

That's all.

Uninstall

At first, rollback schema:

$ cd /path/to/your-redmine
$ rake redmine:plugins:migrate NAME=redmine_default_custom_query VERSION=0 RAILS_ENV=production

Then, remove plugins/redmine_default_custom_query directory.

Contribute

How to test

$ cd /path/to/redmine
$ bundle install
$ bundle exec rake redmine:plugins:test NAME=redmine_default_custom_query

Pull Request

  1. Fork it
  2. Create your feature branch: git checkout -b new-feature
  3. Commit your changes: git commit -am 'add some new feature'
  4. Push to the branch: git push origin new-feature
  5. Create new Pull Request

Report bugs

Please report from here.

Copyright

© Katsuya Hidaka. See MIT-LICENSE for further details.

redmine_default_custom_query's People

Contributors

archonwang avatar atmis avatar giraypultar avatar hidakatsuya avatar insspb avatar maeda-m avatar marius-balteanu avatar picman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redmine_default_custom_query's Issues

Global default custom query settings

  • Setting in plugin setting page
  • Global queries are selectable
  • Priority of applying the query to each project:
    1. Setting of each project
    2. Global setting

Error with redmine 4.1.1 undefined method `options_for_selectable_queries'

I'm running redmine 4.1.1 and this is the error I'm seeing when I try to visit the admin settings page where this plugin is enabled

Other plugins:

redmine_checklists

Started GET "/projects/testproject/settings" for 2001:db8:: at 2020-05-06 16:47:17 +0200
Processing by ProjectsController#settings as HTML
  Parameters: {"id"=>"testproject"}
  Current user: user (id=)
  Rendering projects/settings.html.erb within layouts/base
  Rendered projects/_form.html.erb (12.2ms)
  Rendered projects/_edit.html.erb (13.1ms)
  Rendered projects/settings/_members.html.erb (80.3ms)
  Rendered projects/settings/_issues.html.erb (29.6ms)
  Rendered projects/settings/_versions.html.erb (6.1ms)
  Rendered projects/settings/_issue_categories.html.erb (2.7ms)
  Rendered plugins/redmine_checklists/app/views/projects/settings/_checklist_templates.html.erb (4.2ms)
  Rendered plugins/redmine_default_custom_query/app/views/default_custom_query_setting/_form.html.erb (114.0ms)
  Rendered common/_tabs.html.erb (254.5ms)
  Rendered projects/settings.html.erb within layouts/base (256.5ms)
Completed 500 Internal Server Error in 278ms (ActiveRecord: 24.3ms)
  
ActionView::Template::Error (undefined method `options_for_selectable_queries' for #<#<Class:0x0000000817f24c10>:0x000000081764b0d0>
Did you mean?  options_for_select):
     7: 
     8:   <div class="box tabular">
     9:     <p>
    10:       <%= f.select :query_id, options_for_selectable_queries(@project), include_blank: true %><br>
    11:       <em><%=l 'default_custom_query.text_allowed_queries' %></em>
    12:     </p>
    13:   </div>
  
plugins/redmine_default_custom_query/app/views/default_custom_query_setting/_form.html.erb:10:in `block in _plugins_redmine_default_custom_query_app_views_default_custom_query_setting__form_html_erb___1186724710437595683_17353471660'
app/helpers/application_helper.rb:1358:in `labelled_form_for'
plugins/redmine_default_custom_query/app/views/default_custom_query_setting/_form.html.erb:1:in `_plugins_redmine_default_custom_query_app_views_default_custom_query_setting__form_html_erb___1186724710437595683_17353471660'
app/views/common/_tabs.html.erb:21:in `block in _app_views_common__tabs_html_erb__1866765444854928881_17380913840'
app/views/common/_tabs.html.erb:20:in `each'
app/views/common/_tabs.html.erb:20:in `_app_views_common__tabs_html_erb__1866765444854928881_17380913840'
app/helpers/application_helper.rb:439:in `render_tabs'
app/views/projects/settings.html.erb:3:in `_app_views_projects_settings_html_erb___2267329726800610017_17380747320'
lib/redmine/sudo_mode.rb:65:in `sudo_mode'

uninitialized constant Project::ProjectsDefaultQuery On redmine 3.0.1

activerecord (4.2.0) lib/active_record/inheritance.rb:158:in compute_type' activerecord (4.2.0) lib/active_record/reflection.rb:271:incompute_class'
activerecord (4.2.0) lib/active_record/reflection.rb:267:in klass' activerecord (4.2.0) lib/active_record/associations/association.rb:118:inklass'
activerecord (4.2.0) lib/active_record/associations/collection_association.rb:41:in reader' activerecord (4.2.0) lib/active_record/associations/builder/association.rb:115:indefault_queries'
plugins/redmine_default_custom_query-master/app/patches/models/project_patch.rb:16:in default_query' plugins/redmine_default_custom_query-master/app/patches/controllers/issues_controller_patch.rb:53:infind_default_query'
plugins/redmine_default_custom_query-master/app/patches/controllers/issues_controller_patch.rb:57:in apply_default_query!' plugins/redmine_default_custom_query-master/app/patches/controllers/issues_controller_patch.rb:31:inwith_default_query'
activesupport (4.2.0) lib/active_support/callbacks.rb:427:in block in make_lambda' activesupport (4.2.0) lib/active_support/callbacks.rb:145:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:145:in block in halting_and_conditional' activesupport (4.2.0) lib/active_support/callbacks.rb:151:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:151:in block in halting_and_conditional' activesupport (4.2.0) lib/active_support/callbacks.rb:151:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:151:in block in halting_and_conditional' activesupport (4.2.0) lib/active_support/callbacks.rb:151:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:151:in block in halting_and_conditional' activesupport (4.2.0) lib/active_support/callbacks.rb:151:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:151:in block in halting_and_conditional' activesupport (4.2.0) lib/active_support/callbacks.rb:151:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:151:in block in halting_and_conditional' activesupport (4.2.0) lib/active_support/callbacks.rb:169:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:169:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:169:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:169:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:169:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:169:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:234:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:234:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:169:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:92:incall'
activesupport (4.2.0) lib/active_support/callbacks.rb:92:in _run_callbacks' activesupport (4.2.0) lib/active_support/callbacks.rb:734:in_run_process_action_callbacks'
activesupport (4.2.0) lib/active_support/callbacks.rb:81:in run_callbacks' actionpack (4.2.0) lib/abstract_controller/callbacks.rb:19:inprocess_action'
actionpack (4.2.0) lib/action_controller/metal/rescue.rb:29:in process_action' actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:31:inblock in process_action'
activesupport (4.2.0) lib/active_support/notifications.rb:164:in block in instrument' activesupport (4.2.0) lib/active_support/notifications/instrumenter.rb:20:ininstrument'
activesupport (4.2.0) lib/active_support/notifications.rb:164:in instrument' actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:30:inprocess_action'
actionpack (4.2.0) lib/action_controller/metal/params_wrapper.rb:250:in process_action' activerecord (4.2.0) lib/active_record/railties/controller_runtime.rb:18:inprocess_action'
actionpack (4.2.0) lib/abstract_controller/base.rb:137:in process' actionview (4.2.0) lib/action_view/rendering.rb:30:inprocess'
actionpack (4.2.0) lib/action_controller/metal.rb:195:in dispatch' actionpack (4.2.0) lib/action_controller/metal/rack_delegation.rb:13:indispatch'
actionpack (4.2.0) lib/action_controller/metal.rb:236:in block in action' actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:incall'
actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:in dispatch' actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:42:inserve'
actionpack (4.2.0) lib/action_dispatch/journey/router.rb:43:in block in serve' actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:ineach'
actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in serve' actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:802:incall'
rack-openid (1.4.2) lib/rack/openid.rb:98:in call' request_store (1.0.5) lib/request_store/middleware.rb:9:incall'
rack (1.6.0) lib/rack/etag.rb:24:in call' rack (1.6.0) lib/rack/conditionalget.rb:25:incall'
rack (1.6.0) lib/rack/head.rb:13:in call' actionpack-xml_parser (1.0.1) lib/action_dispatch/xml_params_parser.rb:16:incall'
actionpack (4.2.0) lib/action_dispatch/middleware/params_parser.rb:27:in call' actionpack (4.2.0) lib/action_dispatch/middleware/flash.rb:260:incall'
rack (1.6.0) lib/rack/session/abstract/id.rb:225:in context' rack (1.6.0) lib/rack/session/abstract/id.rb:220:incall'
actionpack (4.2.0) lib/action_dispatch/middleware/cookies.rb:560:in call' activerecord (4.2.0) lib/active_record/query_cache.rb:36:incall'
activerecord (4.2.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in call' actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:29:inblock in call'
activesupport (4.2.0) lib/active_support/callbacks.rb:88:in call' activesupport (4.2.0) lib/active_support/callbacks.rb:88:in_run_callbacks'
activesupport (4.2.0) lib/active_support/callbacks.rb:734:in _run_call_callbacks' activesupport (4.2.0) lib/active_support/callbacks.rb:81:inrun_callbacks'
actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (4.2.0) lib/action_dispatch/middleware/reloader.rb:73:incall'
actionpack (4.2.0) lib/action_dispatch/middleware/remote_ip.rb:78:in call' actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:incall'
actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in call' railties (4.2.0) lib/rails/rack/logger.rb:38:incall_app'
railties (4.2.0) lib/rails/rack/logger.rb:20:in block in call' activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:inblock in tagged'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in tagged' activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:intagged'
railties (4.2.0) lib/rails/rack/logger.rb:20:in call' actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:incall'
rack (1.6.0) lib/rack/methodoverride.rb:22:in call' rack (1.6.0) lib/rack/runtime.rb:18:incall'
activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in call' rack (1.6.0) lib/rack/lock.rb:17:incall'
actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in call' rack (1.6.0) lib/rack/sendfile.rb:113:incall'
railties (4.2.0) lib/rails/engine.rb:518:in call' railties (4.2.0) lib/rails/application.rb:164:incall'
railties (4.2.0) lib/rails/railtie.rb:194:in public_send' railties (4.2.0) lib/rails/railtie.rb:194:inmethod_missing'
passenger (5.0.6) lib/phusion_passenger/rack/thread_handler_extension.rb:85:in process_request' passenger (5.0.6) lib/phusion_passenger/request_handler/thread_handler.rb:149:inaccept_and_process_next_request'
passenger (5.0.6) lib/phusion_passenger/request_handler/thread_handler.rb:110:in main_loop' passenger (5.0.6) lib/phusion_passenger/request_handler.rb:414:inblock (3 levels) in start_threads'
passenger (5.0.6) lib/phusion_passenger/utils.rb:111:in `block in create_thread_and_abort_on_e

Errors reported by rake task during install

When I run the following rake task, when installing this plugin
rake redmine:plugins:migrate NAME=redmine_default_custom_query RAILS_ENV=production

I get the following errors:

rake aborted!
NameError: uninitialized constant DefaultCustomQueryHelper
/var/www/...../plugins/redmine_default_custom_query-1.3.0/lib/default_custom_query.rb:14:in block in ' /var/www/...../vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:446:in instance_exec'
/var/www/...../vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:446:in block in make_lambda' /var/www/...../vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:192:in block in simple'
/var/www/...../vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:504:in block in call' /var/www/...../vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:504:in each'
/var/www/...../vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:504:in call' /var/www/...../vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:92:in run_callbacks'
/var/www/...../vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in _run_prepare_callbacks' /var/www/...../vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in run_callbacks'
/var/www/...../vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/reloader.rb:83:in prepare!' /var/www/...../vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/reloader.rb:55:in prepare!'
/var/www/...../vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/application/finisher.rb:50:in block in ' /var/www/...../vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/initializable.rb:30:in instance_exec'
/var/www/...../vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/initializable.rb:30:in run' /var/www/...../vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/initializable.rb:55:in block in run_initializers'
/var/www/...../vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/initializable.rb:54:in run_initializers' /var/www/...../vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/application.rb:352:in initialize!'
/var/www/...../config/environment.rb:14:in ' /var/www/...../plugins/a_common_libs/lib/tasks/a_common_libs.rake:1:in '
/var/www/...../lib/tasks/redmine.rake:194:in block in ' /var/www/...../lib/tasks/redmine.rake:194:in each'
/var/www/...../lib/tasks/redmine.rake:194:in ' /var/www/...../vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/engine.rb:658:in block in run_tasks_blocks'
/var/www/...../vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/engine.rb:658:in each' /var/www/...../vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/engine.rb:658:in run_tasks_blocks'
/var/www/...../vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/application.rb:452:in run_tasks_blocks' /var/www/...../vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/engine.rb:453:in load_tasks'
/var/www/...../vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in public_send' /var/www/...../vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in method_missing'
/var/www/...../Rakefile:7:in ' /var/www/...../vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/exe/rake:27:in '
(See full trace by running task with --trace)

Is there anything else you need to know from me?

Kind regards,

Jonathan

Cannot start Redmine after installation

Hello, I wanted to test the plugin. Sounds like a very useful extension.

Unfortunately I can't start Redmine with the installed plugin anymore. Since I didn't make any other changes to the system, it's probably due to the plugin or an incompatibility.
I'm afraid I have no knowledge of Rails.

In the log I find the following lines:

Nov 06 20:52:06 3: from /app/code/plugins/redmine_default_custom_query/app/patches/controllers/issues_controller_patch.rb:3:in <top (required)>'
Nov 06 20:52:06 2: from /app/code/plugins/redmine_default_custom_query/app/patches/controllers/issues_controller_patch.rb:4:in <module:DefaultCustomQuery>' Nov 06 20:52:06 1: from /app/code/plugins/redmine_default_custom_query/app/patches/controllers/issues_controller_patch.rb:7:in module:IssuesControllerPatch'
Nov 06 20:52:06 /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/concern.rb:130:in included': Cannot define multiple 'included' blocks for a Concern (ActiveSupport::Concern::MultipleIncludedBlocks)

Redmine Version: 4.0.5.stable
Redmine plugins:
additionals 2.0.21-master
redmine_agile 1.5.0
redmine_checklists 3.1.16
redmine_contacts 4.2.5
redmine_contacts_helpdesk 4.1.5
redmine_gitlab_hook 4.0.0
redmine_image_clipboard_paste 3.3.0
redmine_issue_history_filter 0.0.1
redmine_issue_templates 0.3.4
redmine_lightbox2 0.5.0
redmine_silencer 0.4.3
redmineup_tags 2.0.8
sidebar_hide 0.0.8
time_logger 0.5.4

Thanx for looking at the problem.

First view don't show selected query

I poject and subproject organized like this:

test

sub test

Project "test" have local query "test view1"
Project "sub test" have local query "test view2"

both - "test" and "sub test" projects have enabled module "Default custom query"
when I go to direct links {WWW}/projects/test/issues <> {WWW}/projects/sub-test/issues
gives only one project with custom query other comes with default system query.

Same If I'll try clicking Projects > test > Issues > Projects > sub test > Issues

Moreover I have tried other sequence:

  1. Project
  2. test
  3. Issues (gives default system query)
  4. Issues (gives custom default query)
  5. Project
  6. sub-test
  7. Issues (gives default system query)
  8. Issues (gives custom default query)
Environment:
  Redmine version                2.5.2.stable
  Ruby version                   1.9.3-p0 (2011-10-30) [i686-linux]
  Rails version                  3.2.19
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.6.17
  Mercurial                      2.0.2
  Git                            1.7.9.5
  Filesystem                     
Redmine plugins:
  localizable                    0.3.0
  redmine_default_custom_query   1.0.0
  redmine_didyoumean             1.2.0
  redmine_issue_templates        0.0.9

"Default custom query" tab doesn't appear after install

Hi,

after installation, I can see the plugin in "Administation/Plugins".
But in each projects, the tab is not displayed.

Environment:
  Redmine version                3.4.6.stable
  Ruby version                   2.0.0-p648 (2015-12-16) [x86_64-linux]
  Rails version                  4.2.8     
Redmine plugins:
  redmine_default_custom_query   1.3.0

Thanks !

Can Not Create Query

My System:
Rails 4.2
Ruby 1.9
Redmine 3.0.3
Windows 7 64bit

I recently installed your plugin but I cannot find out how to make it work. Here are some images of what I am seeing:
queryexample1
queryexample2
queryexample3

Do you know where I have to go to create a query? I would think there would be a "create query" button somewhere but I cannot get it to work...

Error in Redmine 3.4.1

I'm getting this error. Is it because the plugin only works with Redmine 3.3?

Started GET "/projects/gfdk/settings" for 127.0.0.1 at 2017-07-12 15:34:04 +0200
Processing by ProjectsController#settings as HTML
  Parameters: {"id"=>"gfdk"}
  Current user: admin (id=1)
  Rendered projects/_form.html.erb (15.0ms)
  Rendered projects/_edit.html.erb (16.1ms)
  Rendered projects/settings/_modules.html.erb (4.1ms)
  Rendered projects/settings/_members.html.erb (12.1ms)
  Rendered projects/settings/_versions.html.erb (1.8ms)
  Rendered projects/settings/_issue_categories.html.erb (1.7ms)
  Rendered projects/settings/_wiki.html.erb (1.1ms)
  Rendered plugins/redmine_default_custom_query/app/views/default_custom_query_setting/_form.html.erb (9.3ms)
  Rendered common/_tabs.html.erb (50.0ms)
  Rendered projects/settings.html.erb within layouts/base (51.9ms)
Completed 500 Internal Server Error in 114ms (ActiveRecord: 59.7ms)

ActionView::Template::Error (undefined method `only_public' for #<ActiveRecord::Associations::CollectionProxy []>):
     7:
     8:   <div class="box tabular">
     9:     <p>
    10:       <%= f.select :query_id, options_for_selectable_queries(@project), include_blank: true %><br>
    11:       <em><%=l 'default_custom_query.text_allowed_queries' %></em>
    12:     </p>
    13:   </div>
  plugins/redmine_default_custom_query/app/helpers/default_custom_query_helper.rb:10:in `options_for_selectable_queries'
  plugins/redmine_default_custom_query/app/views/default_custom_query_setting/_form.html.erb:10:in `block in _plugins_redmine_default_custom_query_app_views_default_custom_query_setting__form_html_erb__1205119961705873908_70005567268020'
  app/helpers/application_helper.rb:1188:in `labelled_form_for'
  plugins/redmine_default_custom_query/app/views/default_custom_query_setting/_form.html.erb:1:in `_plugins_redmine_default_custom_query_app_views_default_custom_query_setting__form_html_erb__1205119961705873908_70005567268020'
  app/views/common/_tabs.html.erb:17:in `block in _app_views_common__tabs_html_erb__1467103625908126477_24963420'
  app/views/common/_tabs.html.erb:16:in `each'
  app/views/common/_tabs.html.erb:16:in `_app_views_common__tabs_html_erb__1467103625908126477_24963420'
  app/helpers/application_helper.rb:343:in `render_tabs'
  app/views/projects/settings.html.erb:3:in `_app_views_projects_settings_html_erb__3619103283396159448_26060020'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

カスタムクエリの表示権限がなくなるとチケット一覧で403エラーが発生する

現象

デフォルトに設定されたカスタムクエリの 表示 の設定を "すべてのユー
ザ" から ロールによる制限 に変更したときに、表示権限がないロールのアカウ
ントで チケットの一覧を表示した時に403 エラー が発生しました。

再現手順

  1. デフォルトのカスタムクエリを設定する
  2. 表示:すべてのユーザー、全プロジェクト向け:チェックなし
  3. プロジェクトのメンバーでチケット一覧画面を表示して、デフォルトになっ
    ていることを確認する
  4. カスタムクエリの表示条件をロールによる制限 or 自分のみに変更する
  5. 表示権限がないロールのメンバーでチケットの一覧を表示する
  6. 一度、チケット一覧を表示している場合は、クエリをクリアする
  7. 403エラーが発生する

実行環境

  • Redmine 2.5.1

Redmine 5.x

Hello!
Are you planning to adapt your plugin for Redmine 5.x?

Some redmine links do not work anymore when the a defaul query is defined on the project

  • Set a default query for a project
  • Go to "Overview" tab from the project and click on a link from the Issue tracking box (for example: open bugs)
  • Observe that the issues returned by the default query are listed, instead of the open bugs

Also, the "Filter" option from the context menu doesn't work when a default query is set.

  • Go to issues tab
  • Select multiple issues
  • Open context menu and select "Filter'
  • Observe that the same issues returned by default query are listed.

tab "Default custom query" is availible for admin user only

I enable module "Default Custom Query" in project settings.

But tab "Default custom query" is availible for admin user only. But plugin works right.

Redmine version                3.3.1.stable
Ruby version                   2.2.3-p173 (2015-08-18) [x86_64-linux]
Rails version                  4.2.7.1

Can't open "setting" tab

After install redmine_default_custom_query, when open setting tab of a project, setting tab never open so redmine_default_custom_query function also can't set.
Redmine version is 4.0.4
Other plugin : DMSF, Lychee basic, Lychee gantt chart

Conflict with DMS plugin

Hi, thank you for your work, i really want use your plugin but i have conflict with another one.

Processing by ProjectsController#settings as HTML
Parameters: {"id"=>"centralni-evidence-ukolu"}
Current user: admin (id=1)
Rendered projects/settings.html.erb within layouts/base (144.3ms)
Completed 500 Internal Server Error in 157ms (ActiveRecord: 4.1ms)

ActionView::Template::Error (super: no superclass method project_settings_tabs' for #<#<Class:0x0055e57d92cc88>:0x0055e57d92c288> Did you mean? project_settings_tabs_with_project_tab): 1: <h2><%=l(:label_settings)%></h2> 2: 3: <%= render_tabs project_settings_tabs %> 4: 5: <% html_title(l(:label_settings)) -%> plugins/redmine_dmsf/lib/redmine_dmsf/patches/projects_helper_patch.rb:29:in project_settings_tabs'
plugins/redmine_default_custom_query/app/patches/helpers/projects_helper_patch.rb:13:in project_settings_tabs_with_default_query_setting_tab' app/views/projects/settings.html.erb:3:in _app_views_projects_settings_html_erb__2358237997190216469_70074762436920'
lib/redmine/sudo_mode.rb:63:in sudo_mode' plugins/redmine_dmsf/lib/redmine_dmsf/webdav/custom_middleware.rb:62:in call'

Is there any chance to fix it?

Install indicates only redmine version 4.0?

I tried to install, which failed due to version 4.0 requirement (I am on 3.4.8)
https://www.redmine.org/plugins/redmine_default_custom_query
indicates it should be good for that.
Install failed on version not 4.0
Uninstall doesn't work due to version requirement, so int init.rb I changed requires_redmine to 3.4 and ran uninstall
Removed plugin from plugins directory
So...
Is there a different version still out there I can use with redmine 3.4?
Can I just change the requires_redmine in the init.rb and install?
Thanks

Can't open "setting" tab

Other situation from #42
Issue Condition
Project setting tab can't open after redmine default custom query install
Default custom query version
1.4.0
Redmine version
4.0.4
Other plugin
Lychee basic and others (Lychee Project Template plugin 1.2.12)
Lychee gantt chart 4.1.6
Redmine Issue Templates plugin 0.3.5
Redmine Wiki Lists plugin 0.0.9

This time DMSF is not installed. So, #37 (#1020 of DMSF) is not affected of this issue.

Condition Log
Completed 200 OK in 533ms (Views: 198.5ms | ActiveRecord: 163.3ms)
Started GET "/projects/redmine4-0/settings" for 10.51.. at 2019-10-21 08:37:20 +0900
Processing by ProjectsController#settings as HTML
Parameters: {"id"=>"redmine4-0"}
Current user: ****** (id=***)
Rendering projects/settings.html.erb within layouts/base

It looks server does not respond when setting tub is selected.

Compatibility / Support with Redmine 4.0 and Rails 5.2

Es scheint als wäre das Plugin leider nicht mit Redmine 4.0 bzw. Rails 5.2 kompatibel.
Könnten Sie sich dies einmal anschauen

Folgenden Fehler erhalten wir beim ausführen von " bundle exec rake db:migrate RAILS_ENV=production --trace"

Log:

** Invoke db:migrate (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
NoMethodError: undefined method before_filter' for IssuesController:Class Did you mean? before_action /usr/share/test_redmine/plugins/redmine_default_custom_query/app/patches/controllers/issues_controller_patch.rb:12:in block in module:IssuesControllerPatch'
/var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/concern.rb:122:in class_eval' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/concern.rb:122:in append_features'
/usr/share/test_redmine/plugins/redmine_default_custom_query/app/patches/controllers/issues_controller_patch.rb:92:in include' /usr/share/test_redmine/plugins/redmine_default_custom_query/app/patches/controllers/issues_controller_patch.rb:92:in block in <top (required)>'
/usr/share/test_redmine/plugins/redmine_default_custom_query/app/patches/controllers/issues_controller_patch.rb:91:in tap' /usr/share/test_redmine/plugins/redmine_default_custom_query/app/patches/controllers/issues_controller_patch.rb:91:in <top (required)>'
/var/lib/gems/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' /var/lib/gems/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require'
/var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in block in require' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in load_dependency'
/var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in require' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:378:in block in require_or_load'
/var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:37:in block in load_interlock' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:14:in block in loading'
/var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/concurrency/share_lock.rb:151:in exclusive' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:13:in loading'
/var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:37:in load_interlock' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:356:in require_or_load'
/var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:334:in depend_on' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:246:in require_dependency'
/usr/share/test_redmine/plugins/redmine_default_custom_query/lib/default_custom_query.rb:11:in block (2 levels) in <top (required)>' /usr/share/test_redmine/plugins/redmine_default_custom_query/lib/default_custom_query.rb:11:in each'
/usr/share/test_redmine/plugins/redmine_default_custom_query/lib/default_custom_query.rb:11:in block in <top (required)>' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:426:in instance_exec'
/var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:426:in block in make_lambda' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:198:in block (2 levels) in halting'
/var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:606:in block (2 levels) in default_terminator' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in catch'
/var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in block in default_terminator' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:199:in block in halting'
/var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in block in invoke_before' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in each'
/var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in invoke_before' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:131:in run_callbacks'
/var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/reloader.rb:89:in prepare!' /var/lib/gems/2.3.0/gems/railties-5.2.2/lib/rails/application/finisher.rb:63:in block in module:Finisher'
/var/lib/gems/2.3.0/gems/railties-5.2.2/lib/rails/initializable.rb:32:in instance_exec' /var/lib/gems/2.3.0/gems/railties-5.2.2/lib/rails/initializable.rb:32:in run'
/var/lib/gems/2.3.0/gems/railties-5.2.2/lib/rails/initializable.rb:61:in block in run_initializers' /usr/lib/ruby/2.3.0/tsort.rb:228:in block in tsort_each'
/usr/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' /usr/lib/ruby/2.3.0/tsort.rb:431:in each_strongly_connected_component_from'
/usr/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component' /usr/lib/ruby/2.3.0/tsort.rb:347:in each'
/usr/lib/ruby/2.3.0/tsort.rb:347:in call' /usr/lib/ruby/2.3.0/tsort.rb:347:in each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:226:in tsort_each' /usr/lib/ruby/2.3.0/tsort.rb:205:in tsort_each'
/var/lib/gems/2.3.0/gems/railties-5.2.2/lib/rails/initializable.rb:60:in run_initializers' /var/lib/gems/2.3.0/gems/railties-5.2.2/lib/rails/application.rb:361:in initialize!'
/usr/share/test_redmine/config/environment.rb:16:in <top (required)>' /var/lib/gems/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require'
/var/lib/gems/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in block in require'
/var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in load_dependency' /var/lib/gems/2.3.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in require'
/var/lib/gems/2.3.0/gems/railties-5.2.2/lib/rails/application.rb:337:in require_environment!' /var/lib/gems/2.3.0/gems/railties-5.2.2/lib/rails/application.rb:520:in block in run_tasks_blocks'
/var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:273:in block in execute' /var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:273:in each'
/var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:273:in execute' /var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:214:in block in invoke_with_call_chain'
/usr/lib/ruby/2.3.0/monitor.rb:214:in mon_synchronize' /var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:194:in invoke_with_call_chain'
/var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:238:in block in invoke_prerequisites' /var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:236:in each'
/var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:236:in invoke_prerequisites' /var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:213:in block in invoke_with_call_chain'
/usr/lib/ruby/2.3.0/monitor.rb:214:in mon_synchronize' /var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:194:in invoke_with_call_chain'
/var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:238:in block in invoke_prerequisites' /var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:236:in each'
/var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:236:in invoke_prerequisites' /var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:213:in block in invoke_with_call_chain'
/usr/lib/ruby/2.3.0/monitor.rb:214:in mon_synchronize' /var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:194:in invoke_with_call_chain'
/var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/task.rb:183:in invoke' /var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/application.rb:160:in invoke_task'
/var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/application.rb:116:in block (2 levels) in top_level' /var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/application.rb:116:in each'
/var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/application.rb:116:in block in top_level' /var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/application.rb:125:in run_with_threads'
/var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/application.rb:110:in top_level' /var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/application.rb:83:in block in run'
/var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/application.rb:186:in standard_exception_handling' /var/lib/gems/2.3.0/gems/rake-12.3.2/lib/rake/application.rb:80:in run'
/var/lib/gems/2.3.0/gems/rake-12.3.2/exe/rake:27:in <top (required)>' /usr/local/bin/rake:23:in load'
/usr/local/bin/rake:23:in `

'
Tasks: TOP => db:migrate => db:load_config => environment

DCQ interferes with custom filtering

I don't know whether this is something you'll want to look into but I'm using your default custom query (DCQ) plugin with Planio (http://plan.io) that uses a custom CRM plugin.

It provides a link to search for issues that involve a customer, from the link issues?company_cache=[company name]&set_filter=1. The problem is that DCQ seems to override this and shows the default query and not filtering by customer.

Is this something that can be fixed?

Cheers,
Tom

deny delete to users

Hi
can I block my users to delete queries? they are very dangerous.....
thanks

Default custom query doesn't work

Dear Katsuya HIDAKA,

I've just installed your plugin and found that it doesn't work on my side :(. I enabled it in project, created custom query and I cannot select it in plugin settings, drop-down list is empty.
Redmine version 2.6.1
Ruby version 1.9.3-p194 (2012-04-20)

Regards,
Vladimir.

Problem in Issue summary page

Hi,
When a default custom query active in a project, The Issue filter links doesn't work on [Issue] Summary page, You are seen always default query result in issue list.

Environment:
Redmine version 3.1.2.stable.14882
Ruby version 2.0.0-p481 (2014-05-08) [x86_64-linux]
Rails version 4.2.4
Environment production
Database adapter Mysql2

There is no error message on the GUI.

Regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.