Git Product home page Git Product logo

redmine_more_filters's Introduction

redmine_more_filters

Redmine plugin to provide necessary filters in queries

Use case(s)

For date filters with future dates, the plugin adds "tomorrow", "next week" and "next" month

PNG that represents a quick overview

For string and text filters, the plugin adds "begins with", "does not begin with", "ends with", "does not end with"

PNG that represents a quick overview

version 1.1.0

By poular request I added even more filters

currently available filters:

Type Filter Value
String begins_with
begins_with_any (supply list of whitespace separated words)
not_begins_with
not_begins_with_any (supply list of whitespace separated words)
ends_with
ends_with_any (supply list of whitespace separated words)
not_ends_with
not_ends_with_any (supply list of whitespace separated words)
contains_any (supply list of whitespace separated words)
not_contains_any (supply list of whitespace separated words)
contains_all (supply list of whitespace separated words)
not_contains_all (supply list of whitespace separated words)
Integer allow any separator other than '+' or '-' between two integers
Date tomorrow
next_week
next_month
List Custom Field (Multiple Values) is (strict) (select values in list)
contains all (select values in list)
is not (strict) (select values in list)
not contains all (select values in list)
Time less than hours ago input number of hours
more than hours ago input number of hours
between ago input numbers of hours (start-end)
between input clock times (start-end)
passed

The new Time filters work on the issue fields "Created On" and "Updated On".

The "passed" filter is very much alike the existing date filter "<=" and toda'y date. However, this filter can be saved without having to update today's date. Further, it will find issues having a creation time or update time only one second ago.

The between clock times filter filters issues irrespectively of the date. If you want to filter clock times of today's date you can add the exsting filter "Updated" or "Created" today.

By grouping issues by the hour (local time aware, local daylight savings aware) you can easily identify the "productive" hour and the "blue hour" of your team.

You can also filter last hour's issues, if Redmine is used in a call center.

Be aware that switching time zones may give surprising results with respect to grouping by local clock time hours. Daylight savings transistions occur at different times in different countries. The grouping is local time aware and groups issues by the creation or update hour of the day.

In Administration->Info you find the configured default timezones for the database, for Rails ActiveRecord and for Redmine. If you run in problems, please check here first.

This plugin has been tested with posstgres. MySQL should run. It also should run on SQLServer, but it has not been tested. Please be aware, that timezone support varies extremely between different databases.

PostgrSQL

Timezone support is built in

MySQL

Need to load the time zone tables first f.i. from the commandline outside of mysql

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql mysql -u root -p

SQLServer

Thereis only little support for timezones in SQLServer

There is a persistently loadable SQL function available

https://github.com/mj1856/SqlServerTimeZoneSupport

You MUST install this SQLServer function to your database for this plugin to work with timezone grouping

Install

  1. download plugin and copy plugin folder redmine_user_text_box to Redmine's plugins folder

  2. restart server f.i.

sudo /etc/init.d/apache2 restart

(no migration is necessary)

Uninstall

  1. go to plugins folder, delete plugin folder

rm -r redmine_more_filters

  1. restart server f.i.

sudo /etc/init.d/apache2 restart

Use

Just install and go to issue page and select a date field with future dates, or a text or a atring fiter

Have fun!

Localisations

  • Chinese
  • English
  • French
  • German
  • Portugese
  • Russian
  • Spanish

1.4.3

  • added root issue filter
  • added related issues filter
  • added all related issues filter
  • added Gantt link in Subtasks pane, Related Tasks pane and in Issue's action menu
  • added Gantt link in Issue context menu
  • added Gantt auto centering of Gantt charts for Gantt links
  • added next three months for date queries
  • added localizations: es, fr, ru, pt

1.4.2

  • compatible with RedmineUp's redmine CRM plugin

1.4.1

  • supports search text in notes, filename, description, author and creation time of attachments

1.4.0

  • added more time filters
  • time filters supported for postgres (tested), MySQL (untested) and SQLServer (untested)
  • added database timezone info in Administration->Info

1.3.1

  • added support for arbitrary separators for integer (like ID) "=", like 123;456 789

1.3.0

  • added Rails 5 support

1.2.3

  • added "contains all" and "not contains all" for list custom fields having mutiple values

1.2.2

  • added strict "is" and "is not" filter for list custom fields having mutiple values (basically acting like boolean "AND") in addition to "is" and "is not" (basically acting like boolean "OR")

1.1.0

  • added more text filters by popular request

1.0.2

  • beautified code

0.0.1

  • running on Redmine 3.4.6, 3.4.11

redmine_more_filters's People

Contributors

hugohasenbein avatar tainewoo avatar

Stargazers

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

Watchers

 avatar  avatar

redmine_more_filters's Issues

translation missing: en.field_root in filter list

Снимок экрана 2021-05-24 225744

Environment:
Redmine version 4.2.1.stable
Ruby version 2.6.7-p197 (2021-04-05) [x64-mingw32]
Rails version 5.2.5
Environment production
Database adapter Mysql2
Database timezone RTZ 2 (???
ActiveRecord timezone local
App timezone UTC
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Git 2.31.1
Filesystem
Redmine plugins:
redmine_agile 1.6.1
redmine_checklists 3.1.18
redmine_contacts 4.3.3
redmine_dmsf 2.4.7
redmine_issue_templates 1.1.0
redmine_more_filters 1.4.3
redmine_people 1.6.0
redmine_products 2.1.2
redmine_status_history 1.0.1
redmine_wysiwyg_editor 0.21.1
redmine_zenedit 2.0.0

'myPage' is down with this plugin

Redmine version: 4.10 + Pg12 + Docker

Another extension installed? : Yes

Extension list:

redmine_zenedit
redmine_lightbox2
redmine_issue_templates
redmine_issue_dynamic_edit
redmine_im_link
redmine_more_filters
periodictask
custom_tables

Issue:
'myPage' is unable to navigate with Internal error: 500

Error log:

redmine_1     | I, [2020-01-03T03:59:13.236678 #1]  INFO -- : Started GET "/my/page" for 172.22.0.1 at 2020-01-03 03:59:13 +0000
redmine_1     | I, [2020-01-03T03:59:13.237354 #1]  INFO -- : Processing by MyController#page as HTML
redmine_1     | I, [2020-01-03T03:59:13.244610 #1]  INFO -- :   Current user: admin (id=1)
redmine_1     | I, [2020-01-03T03:59:13.246735 #1]  INFO -- :   Rendering my/page.html.erb within layouts/base
redmine_1     | I, [2020-01-03T03:59:13.269681 #1]  INFO -- :   Rendered my/page.html.erb within layouts/base (22.8ms)
redmine_1     | I, [2020-01-03T03:59:13.269847 #1]  INFO -- : Completed 500 Internal Server Error in 32ms (ActiveRecord: 7.2ms)
redmine_1     | F, [2020-01-03T03:59:13.270332 #1] FATAL -- :   
redmine_1     | F, [2020-01-03T03:59:13.270358 #1] FATAL -- : ActionView::Template::Error (wrong number of arguments (given 5, expected 4)):
redmine_1     | F, [2020-01-03T03:59:13.270442 #1] FATAL -- :     10: <div id="my-page" class="splitcontent">
redmine_1     |     11: <% @groups.each do |group| %>
redmine_1     |     12:   <div id="list-<%= group %>" class="block-receiver splitcontent<%= group %>">
redmine_1     |     13:     <%= render_blocks(@blocks[group], @user) %>
redmine_1     |     14:   </div>
redmine_1     |     15: <% end %>
redmine_1     |     16: </div>
redmine_1     | F, [2020-01-03T03:59:13.270464 #1] FATAL -- :   
redmine_1     | F, [2020-01-03T03:59:13.270487 #1] FATAL -- : plugins/redmine_more_filters/lib/redmine_more_filters/patches/query_patch.rb:181:in `sql_for_custom_field_with_more_filters'
redmine_1     | app/models/issue_query.rb:660:in `sql_for_project_status_field'
redmine_1     | plugins/redmine_more_filters/lib/redmine_more_filters/patches/query_patch.rb:286:in `block in statement_with_more_filters'
redmine_1     | plugins/redmine_more_filters/lib/redmine_more_filters/patches/query_patch.rb:221:in `each_key'
redmine_1     | plugins/redmine_more_filters/lib/redmine_more_filters/patches/query_patch.rb:221:in `statement_with_more_filters'
redmine_1     | app/models/issue_query.rb:329:in `issues'
redmine_1     | app/helpers/my_helper.rb:102:in `render_issuesassignedtome_block'
redmine_1     | app/helpers/my_helper.rb:64:in `render_block_content'
redmine_1     | app/helpers/my_helper.rb:35:in `render_block'
redmine_1     | app/helpers/my_helper.rb:27:in `block in render_blocks'
redmine_1     | app/helpers/my_helper.rb:26:in `each'
redmine_1     | app/helpers/my_helper.rb:26:in `render_blocks'
redmine_1     | app/views/my/page.html.erb:13:in `block in _app_views_my_page_html_erb___96863387556133507_47227918863200'
redmine_1     | app/views/my/page.html.erb:11:in `each'
redmine_1     | app/views/my/page.html.erb:11:in `_app_views_my_page_html_erb___96863387556133507_47227918863200'
redmine_1     | lib/redmine/sudo_mode.rb:65:in `sudo_mode'
redmine_1     | http://127.0.0.1/issues -> /my/page
redmine_1     | 172.22.0.1 - - [03/Jan/2020:03:59:18 UTC] "GET / HTTP/1.1" 200 11183
redmine_1     | http://127.0.0.1/issues -> /
redmine_1     | 172.22.0.1 - - [03/Jan/2020:03:59:21 UTC] "GET /projects HTTP/1.1" 200 20468
redmine_1     | http://127.0.0.1/ -> /projects
redmine_1     | 172.22.0.1 - - [03/Jan/2020:03:59:22 UTC] "GET /my/page HTTP/1.1" 500 648

Expectation:
The plugin should not cause 'myPage' down.

Thanks,

Asigned To Not Equal issue

Hi Hugo, nice to talk with you.

First of all, thanks for the plugin.

I have two issues, the second is more important than first.

First:

When i try to filter by assigned_to, equal option, i have to make a trick to can add more users. I dont know why, need to unselect, re select and something like that to make it works. But finally is ok.

Second:

If i want to filter by assigned_to, not equal option, i have no field to select users to filter, not at all.

image

new operator: is + AND or is all

Currently the operator of issue filter "is" actually acts as "is + OR", if there are multiple values selected after the operator "is", the logical connection between different values is "OR", so just like "is any of the values".
But if we want to filter the issues, using is xxx AND xxx AND xxx...., it's not working, because the filter set only support one instance for one filter.
Such as, filter Affected version can only be added for one time, with one operator and one value.

it would be good if you can help implement this kind of operator.

new operator: xxx ID (such as Issue ID) from file (csv/excel/text)

Currently we have to copy the IDs and organize them as "12,34,25" kind of value, and use the filter "Issue" and operator "is" to filter issues.
if we can load the IDs from a file (kind of CSV import) to process the filter, users don't have to organize the IDs one by one, especially when there are hundreds of IDs in the file.
Then the filter should be:
filter "Issue", operator "from file", which only IDs are listed in the file, or maybe have the opportunity to change which element/column to get the IDs after the file is loaded.

Plugin breaks the standard "My projects" filter on the /projects page

Plugin breaks the standard "My projects" filter on the /projects page

Environment:
  Redmine version                4.2.1.stable
  Ruby version                   2.6.7-p197 (2021-04-05) [x64-mingw32]
  Rails version                  5.2.5
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp

new filter: Search from journal for specific value of specific field during specific period

Currently the query filter set can only search the last value of the fields of issues.
And the filter "Updated" can only search updated during a period, but can't search what is updated, and what is/was the value of it.

It would be better to expand the query of the "Updated" to search from the journal.
such as:
updated: add more query criteria to filter which property/field is updated, and the old/new value of that property/field
or:
query: field value was xxx at xxx time, operator can be was during, value: field value + datetime1 + datetime2
or:
query: updated + fieldvalue at that time

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.