Project

General

Profile

Extra query operators plugin

Added by Vitaly Klimov almost 14 years ago

Redmine extra query operators plugin

Plugin adds extra operators to issues query, allowing to select exact dates and offsets from current date. Also this plugin adds ability to use regular expressions in text fields

Details are available at http://www.redmine.org/plugins/redmine_extra_query_operators

Please download latest version of the plugin from plugin page!


Replies (52)

RE: Extra query operators plugin - Added by Vitaly Klimov about 13 years ago

Have you installed latest version from plugin' page? I am using it with no problems with 1.2.1

Do you have some other plugins installed like redmine_show_description?

RE: Extra query operators plugin - Added by Steven Wong about 13 years ago

Yes, I have other plugin

but It works well if I uninstall the redmine_show_description.

RE: Extra query operators plugin - Added by Waleed Mansoor about 13 years ago

Hi,

Thanks for really great plugin. We heavily use it. However since updating to 1.2.X we cant seem to make it work.

If the plugin is installed,
1.3 version :: the simple query for closed issue results in page error, however the query with extra queries work fine
1.4 version :: the issues page has error, following is entry in log file.

Hope this helps you to
ActionView::TemplateError (undefined method `value_for' for #<Query:0xb637288>) on line #148 of vendor/plugins/redmine_extra_query_operators_v004/redmine_extra_query_operators/app/views/queries/_filters.rhtml:
145: <span class="span_values_<%= field >"><= text_field_tag "v[#{field}][]", query.value_for(field), :size => 3, :class => "values_#{field}" > <= l(:label_eqo_mw_tip) ></span>
146: <
# VVK end >
147: <
when :string, :text >
148: <span class="span_values_<
= field >"><= text_field_tag "v[#{field}][]", query.value_for(field), :class => "values_#{field}", :id => "values_#{field}", :size => 30 ></span>
149: <
when :integer, :float >
150: <span class="span_values_<
= field >"><= text_field_tag "v[#{field}][]", query.value_for(field), :class => "values_#{field}", :id => "values_#{field}_1", :size => 6 ></span>
151: <span class="span_values_<
= field >"><= text_field_tag "v[#{field}][]", query.value_for(field, 1), :class => "values_#{field}", :id => "values_#{field}_2", :size => 6 %></span>

vendor/plugins/redmine_extra_query_operators_v004/redmine_extra_query_operators/app/views/queries/_filters.rhtml:148:in `_run_rhtml_vendor47plugins47redmine_extra_query_operators_v00447redmine_extra_query_operators47app47views47queries47_filters46rhtml_locals_filters_object_query'
vendor/plugins/redmine_extra_query_operators_v004/redmine_extra_query_operators/app/views/queries/_filters.rhtml:121:in `each'
vendor/plugins/redmine_extra_query_operators_v004/redmine_extra_query_operators/app/views/queries/_filters.rhtml:121:in `_run_rhtml_vendor47plugins47redmine_extra_query_operators_v00447redmine_extra_query_operators47app47views47queries47_filters46rhtml_locals_filters_object_query'
app/views/issues/index.rhtml:17:in `_run_rhtml_app47views47issues47index46rhtml'
app/views/issues/index.rhtml:11:in `_run_rhtml_app47views47issues47index46rhtml'
app/controllers/issues_controller.rb:92:in `index'
app/controllers/issues_controller.rb:91:in `index'
config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi'

Rendering E:/Redmine/bitnami/apps/redmine/public/500.html (500 Internal Server Error)

These are other plugins in my plugin directory

2011-09-05 오후 02:40 <DIR> acts_as_activity_provider
2011-09-05 오후 02:40 <DIR> acts_as_attachable
2011-09-05 오후 02:40 <DIR> acts_as_customizable
2011-09-05 오후 02:40 <DIR> acts_as_event
2011-09-05 오후 02:40 <DIR> acts_as_list
2011-09-05 오후 02:40 <DIR> acts_as_searchable
2011-09-05 오후 02:40 <DIR> acts_as_tree
2011-09-05 오후 02:40 <DIR> acts_as_versioned
2011-09-05 오후 02:40 <DIR> acts_as_watchable
2011-09-05 오후 02:40 <DIR> awesome_nested_set
2011-09-05 오후 02:40 <DIR> classic_pagination
2011-09-05 오후 02:40 <DIR> engines
2011-09-05 오후 02:40 <DIR> gravatar
2011-09-05 오후 02:40 <DIR> open_id_authentication
2011-09-05 오후 02:40 <DIR> prepend_engine_views
2011-09-05 오후 03:04 <DIR> redmine_local_avatars
2011-09-05 오후 02:40 <DIR> rfpdf
2011-09-05 오후 02:40 <DIR> ruby-net-ldap-0.0.4

I am using bitnami stack 1.2.1.

If you need any other information, i ll gladly provide it.

Thanks again for wonderful effort,

RE: Extra query operators plugin - Added by Davor Zelic about 13 years ago

Hi Waleed,

I've had the same problem using this plugin with Bitnami Redmine Stack.

The problem is that the plugin uses query.value_for function which, for some reason, isn't present in query.rb (Redmine core file) shipped with Bitnami Redmine stack version 1.2.1 and that is why you are receiving the error you've mentioned.

However, this function is present in Redmine trunk so I've added it to extra_query_operators_patch.rb file which is part of Extra query operators plugin. I also made some changes to _filters.rhtml required to make things work as it is supposed to.

I've attached modified version of the plugin to this message.

RE: Extra query operators plugin - Added by Gauthier Brion about 13 years ago

Great Davor, thanks a lot!
Now it's working perfectly on my redmine installation (I'm still in 1.2.0).

Thanks again ;-)

RE: Extra query operators plugin - Added by Waleed Mansoor about 13 years ago

Thankyou so much,

Working like a charm now :)

RE: Extra query operators plugin - Added by Tony Marschall about 13 years ago

Thanks, working again :)

RE: Extra query operators plugin - Added by Eric Diaz about 13 years ago

Hi All
I installed this grreat plugin on my Redmin v1.1.1.
It works fine for date but when i try to use Matches regexp on a Text custom field, a blank page is loaded.
I explain my issue :
I have a custom Field (Text type) on my project.
I'm trying to filter on this custom field in order to find every Ticket with this field empty.
I choose "Matches regexp" and type : #[0-9]#
I click on Apply, the page load and then there is a blank window.

Is it an issue with the plugin or with myself who doesn't use the "Matches regexp" correctly ?

Thanks for your help

RE: Extra query operators plugin - Added by Davor Zelic about 13 years ago

Eric,

according to article at this page www.stackoverflow.com/questions/3012788/regex-check-if-a-line-is-blank-or-not , to find empty values you should use regular expression like this:

^\s*$

or this:

^[ \t\n]*$

I've tried both of them with the plugin and both worked.

For testing regular expression, try www.rubular.com

RE: Extra query operators plugin - Added by Eric Diaz about 13 years ago

Thanks for your answer Davor.
I've just tried both of them but there is still the issue.
I don't understand.
Maybe it is related to the plugin version (0.0.3) on my Redmine version (1.1.1).

Eric

Test.doc (33.5 KB) Test.doc PrintScreen of the issue

RE: Extra query operators plugin - Added by Christian Mayr about 13 years ago

German translation attached - and, by the way, thanks a lot for this important feature!

de.yml (303 Bytes) de.yml

RE: Extra query operators plugin - Added by Tony Marschall about 13 years ago

Hello Vitaly Klimov,

can you please update the plugin to Davor Zelic's version (http://www.redmine.org/boards/3/topics/21015?r=26185#message-26185)?
This one is working with redmine 1.2.x. Thank you.

RE: Extra query operators plugin - Added by rafael mello almost 13 years ago

After Davor Zelic's version works fine on version 1.2.1.

RE: Extra query operators plugin - Added by Avin Tokade almost 13 years ago

Hello Vitaly Klimov,

We are using Redmine (1.2.1.stable.7732 (MySQL)). To generate Employee weekly report, I found this plugin will work as per my requirement.

I have installed this plugin successfully using redmine plugins standard installation steps.

Now When I click to show issues Redmine crash with this error

ActionView::TemplateError (undefined method `value_for' for #<Query:0x7f84b6c9cb00>) on line #148 of vendor/plugins/redmine_extra_query_operators/app/views/queries/_filters.rhtml:
145:                <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field), :size => 3, :class => "values_#{field}" %> <%= l(:label_eqo_mw_tip) %></span>
146:            <%# VVK end %>
147:     <% when :string, :text %>
148:         <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field), :class => "values_#{field}", :id => "values_#{field}", :size => 30 %></span>
149:     <% when :integer, :float %>
150:         <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field), :class => "values_#{field}", :id => "values_#{field}_1", :size => 6 %></span>
151:         <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field, 1), :class => "values_#{field}", :id => "values_#{field}_2", :size => 6 %></span>

How to fix this issue ?

Thanks,
Avin Tokade

RE: Extra query operators plugin - Added by rafael mello almost 13 years ago

Avin Tokade wrote:

Hello Vitaly Klimov,

We are using Redmine (1.2.1.stable.7732 (MySQL)). To generate Employee weekly report, I found this plugin will work as per my requirement.

I have installed this plugin successfully using redmine plugins standard installation steps.

Now When I click to show issues Redmine crash with this error
[...]

How to fix this issue ?

Thanks,
Avin Tokade

Please install Davor Zelic's version.
Link: http://www.redmine.org/boards/3/topics/21015?r=26185#message-26185

RE: Extra query operators plugin - Added by Avin Tokade almost 13 years ago

Thanks for the help. Issue is solved.

Could you please tell me how to add 'is' '>=' and '<=' on 'Start date' and 'Due date' Filters ?

RE: Extra query operators plugin - Added by Vitaly Klimov over 12 years ago

Plugin updated to version 0.0.5 and compatible with the Redmine 1.3.x

Download it from the plugin page: http://www.redmine.org/plugins/redmine_extra_query_operators

Please do remove plugin folder completely before installing new version!

RE: Extra query operators plugin - Added by Steven Wong over 12 years ago

How to remove it completely?

I delete the plugin folder,and delete the public/plugin_assets/*.*
Is it enough?

Thanks.

RE: Extra query operators plugin - Added by Vitaly Klimov over 12 years ago

Yes, that would be enough

RE: Extra query operators plugin - Added by Pierluigi Soana over 12 years ago

Hi!

I loaded the 0.0.5 version in my redmine env (1.3.0), but instead of adding new features it blocks the standard features (e.g.: selecting an element from the Add filter list box doesn't do anything at all)
Is there something else I am missing ?

RE: Extra query operators plugin - Added by Vitaly Klimov over 12 years ago

Plugin updated to 0.0.6

RE: Extra query operators plugin - Added by Steven Wong over 12 years ago

Hi, Vitaly Klimov

it seems containing a bug just when I choose statuse equals to but the status list not displayed.
please check it. thanks.

My enviroment:
musql:5.X
redmine :1.3.2

CentOS

Vitaly Klimov wrote:

Plugin updated to 0.0.6

RE: Extra query operators plugin - Added by Vitaly Klimov over 12 years ago

Plugin updated to version 0.1.1 and compatible with both Redmine 1.3.x and 2.0.x

RE: Extra query operators plugin - Added by Kamil Strzelczyk about 12 years ago

Hi!

I have installed this plugin for Redmine 2.1.2 and I have got some errors:

ActionView::Template::Error (undefined method `operators_for_select' for #<#<Class:0x7f34672911a0>:0x7f346728c4c0>):
43: </td>
44: <td class="operator">
45: <%= label_tag "operators_#{field}", l(:description_filter), :class => "hidden-for-sighted" >
46: <
= select_tag "op[#{field}]", options_for_select(operators_for_select(options[:type]),
47: query.operator_for(field)), :id => "operators_#{field}",
48: :onchange => "toggle_operator('#{field}');" %>
49: </td>

I imported function: operators_for_select but there are problems with javascipts such as: toogle_operator is not defined, toogle_filter is not defined, apply_filters_observer is not defined...

How to fix this issue ?

Thanks,

(26-50/52)