-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Filter on `parent_tracker` (specific depth) * Filter on `parent_status` (specific depth) * Prefix plugin name with `Redmine`
- Loading branch information
Jan Catrysse
committed
Aug 9, 2023
1 parent
ffe4d6f
commit 56fe60e
Showing
13 changed files
with
222 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,54 @@ | ||
# Redmine Parent Child Filters Plugin | ||
This plugin allows filtering on the `trackers` and `status` of parent and child issues. | ||
This plugin provides advanced filtering capabilities for issues in Redmine based on their hierarchical relationships, allowing you to filter based on the `trackers` and `status` of parent and child issues. | ||
|
||
Link to Redmine plugin page: https://www.redmine.org/plugins/redmine_parent_child_filters | ||
Link to Redmine plugin page: [Redmine Parent Child Filters Plugin](https://www.redmine.org/plugins/redmine_parent_child_filters) | ||
|
||
## Compatibility | ||
* Version 0.0.1 >= Redmine 4 (including Redmine 5) | ||
* Redmine 4.x and Redmine 5.x. | ||
|
||
## Features | ||
* Filter on `root` | ||
* Filter on `root_tracker` | ||
* Filter on `root_status` | ||
* Filter on `parent_tracker` | ||
* Filter on `parent_status` | ||
* Filter on `parent_tracker` (any parent) | ||
* Filter on `parent_status` (any parent) | ||
* Filter on `child_tracker` | ||
* Filter on `child_status` | ||
* Operator `not equal to` on `start_date` and `end_date` | ||
* **Root Level Filtering**: Enables you to filter issues based on the root-level attributes. | ||
* `root` | ||
* `root_tracker` | ||
* `root_status` | ||
|
||
* **Immediate Parent Filtering**: Target issues based on their immediate parent attributes. | ||
* `parent_tracker` | ||
* `parent_status` | ||
|
||
* **Any Parent Filtering**: Extend your filtering criteria to any level of the issue's ancestry. | ||
* `parent_tracker` (any parent) | ||
* `parent_status` (any parent) | ||
|
||
* **Depth-Based Parent Filtering**: A powerful feature allowing filtering based on the depth of the issue's ancestry. If multiple depths are selected, the filter considers only the smallest depth. | ||
* `parent_tracker` (with depth selection) | ||
* `parent_status` (with depth selection) | ||
|
||
* **Child Level Filtering**: Directly target child issues with the following attributes. | ||
* `child_tracker` | ||
* `child_status` | ||
|
||
* **Additional Operators**: Enhance your filtering capabilities with additional operators. | ||
* Operator `not equal to` on `start_date` and `end_date` | ||
|
||
* **Settings**: The plugin provides a dedicated Settings menu where | ||
* Each filter can be enabled or disabled as per your requirements. | ||
* Additionally, you can configure the depth settings for depth-based filters. | ||
|
||
## Install | ||
Type below commands: | ||
* $ `cd $RAILS_ROOT/plugins` | ||
* $ `git clone https://github.com/jcatrysse/redmine_parent_child_filters.git` | ||
Follow the commands below for a smooth installation: | ||
* Navigate to your plugins directory: | ||
* `$ cd $RAILS_ROOT/plugins` | ||
* Clone the repository: | ||
* `$ git clone https://github.com/jcatrysse/redmine_parent_child_filters.git` | ||
* Migrate the plugin: | ||
* `$ bundle exec rake redmine:plugins:migrate NAME=redmine_parent_child_filters RAILS_ENV=production` | ||
|
||
Then, restart your Redmine. | ||
Don't forget to restart your Redmine afterward! | ||
|
||
## Uninstall | ||
* Remove plugin folder | ||
* Restart Redmine | ||
* Simply remove the plugin folder. | ||
* Restart Redmine for the changes to take effect. | ||
|
||
## License | ||
GPLv2 | ||
Distributed under the MIT License. Enjoy the flexibility and freedom it brings! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,50 @@ | ||
<p> | ||
<%= label_tag 'enable_root_id_filter', t('labels.enable_root_id_filter') %> | ||
<%= check_box_tag 'settings[enable_root_id_filter]', 1, | ||
@settings['enable_root_id_filter'] %> | ||
</p> | ||
<p> | ||
<%= label_tag 'enable_root_tracker_id_filter', t('labels.enable_root_tracker_id_filter') %> | ||
<%= check_box_tag 'settings[enable_root_tracker_id_filter]', 1, | ||
@settings['enable_root_tracker_id_filter'] %> | ||
</p> | ||
<p> | ||
<%= label_tag 'enable_root_status_id_filter', t('labels.enable_root_status_id_filter') %> | ||
<%= check_box_tag 'settings[enable_root_status_id_filter]', 1, | ||
@settings['enable_root_status_id_filter'] %> | ||
</p> | ||
<p> | ||
<%= label_tag 'enable_parent_tracker_id_filter', t('labels.enable_parent_tracker_id_filter') %> | ||
<%= check_box_tag 'settings[enable_parent_tracker_id_filter]', 1, | ||
@settings['enable_parent_tracker_id_filter'] %> | ||
</p> | ||
<p> | ||
<%= label_tag 'enable_parent_status_id_filter', t('labels.enable_parent_status_id_filter') %> | ||
<%= check_box_tag 'settings[enable_parent_status_id_filter]', 1, | ||
@settings['enable_parent_status_id_filter'] %> | ||
</p> | ||
<p> | ||
<%= label_tag 'enable_a_parent_tracker_id_filter', t('labels.enable_a_parent_tracker_id_filter') %> | ||
<%= check_box_tag 'settings[enable_a_parent_tracker_id_filter]', 1, | ||
@settings['enable_a_parent_tracker_id_filter'] %> | ||
</p> | ||
<p> | ||
<%= label_tag 'enable_a_parent_status_id_filter', t('labels.enable_a_parent_status_id_filter') %> | ||
<%= check_box_tag 'settings[enable_a_parent_status_id_filter]', 1, | ||
@settings['enable_a_parent_status_id_filter'] %> | ||
</p> | ||
<p> | ||
<%= label_tag 'enable_child_tracker_id_filter', t('labels.enable_child_tracker_id_filter') %> | ||
<%= check_box_tag 'settings[enable_child_tracker_id_filter]', 1, | ||
@settings['enable_child_tracker_id_filter'] %> | ||
</p> | ||
<p> | ||
<%= label_tag 'enable_child_status_id_filter', t('labels.enable_child_status_id_filter') %> | ||
<%= check_box_tag 'settings[enable_child_status_id_filter]', 1, | ||
@settings['enable_child_status_id_filter'] %> | ||
</p> | ||
<% | ||
def render_check_box(setting_key) | ||
content_tag :p do | ||
label_tag(setting_key, t("label_#{setting_key}")) + | ||
check_box_tag("settings[#{setting_key}]", 1, @settings[setting_key]) | ||
end | ||
end | ||
%> | ||
<fieldset class="box tabular settings"> | ||
<legend><%= l(:label_general_filters_settings) %></legend> | ||
<%= render_check_box('enable_root_id_filter') %> | ||
<%= render_check_box('enable_root_tracker_id_filter') %> | ||
<%= render_check_box('enable_root_status_id_filter') %> | ||
<%= render_check_box('enable_parent_tracker_id_filter') %> | ||
<%= render_check_box('enable_parent_status_id_filter') %> | ||
<%= render_check_box('enable_a_parent_tracker_id_filter') %> | ||
<%= render_check_box('enable_a_parent_status_id_filter') %> | ||
<%= render_check_box('enable_child_tracker_id_filter') %> | ||
<%= render_check_box('enable_child_status_id_filter') %> | ||
</fieldset> | ||
|
||
<fieldset class="box tabular settings"> | ||
<legend><%= l(:label_specific_filters_settings) %></legend> | ||
<%= render_check_box('enable_a_specific_parent_tracker_id_filter') %> | ||
<%= render_check_box('enable_a_specific_parent_status_id_filter') %> | ||
<p> | ||
<%= label_tag 'min_depth', t('label_min_depth') %> | ||
<%= select_tag 'settings[min_depth]', options_for_select((1..10).to_a, @settings['min_depth'].to_i) %> | ||
</p> | ||
<p> | ||
<%= label_tag 'max_depth', t('label_max_depth') %> | ||
<%= select_tag 'settings[max_depth]', options_for_select((1..10).to_a, @settings['max_depth'].to_i) %> | ||
</p> | ||
</fieldset> | ||
|
||
<%= javascript_tag do %> | ||
function checkMinMax(){ | ||
var minDepth = parseInt($('#settings_min_depth').val()); | ||
var maxDepth = parseInt($('#settings_max_depth').val()); | ||
var changedElement = $(document.activeElement); | ||
if (changedElement.attr('id') === 'settings_min_depth' && minDepth > maxDepth) { | ||
$('#settings_max_depth').val(minDepth); | ||
} else if (changedElement.attr('id') === 'settings_max_depth' && maxDepth < minDepth) { | ||
$('#settings_min_depth').val(maxDepth); | ||
} | ||
} | ||
$('#settings_min_depth, #settings_max_depth').change(checkMinMax); | ||
$(document).ready(function() { checkMinMax(); }); | ||
<% end %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.