|
1 | | -require_relative './lib/mega_calendar/filters.rb' |
| 1 | +## SNIP - Filters |
| 2 | +$mc_filters = {} |
| 3 | +$mc_filters['assignee'] = { |
| 4 | + :type => 'lookup', |
| 5 | + :label => 'field_assigned_to', |
| 6 | + :db_field => 'issues.assigned_to_id', |
| 7 | + :db_field_holiday => 'holidays.user_id', |
| 8 | + :lookup_id => 'id', |
| 9 | + :operators => [:contains, :not_contains], |
| 10 | + :lookup_value => 'name', |
| 11 | + :lookup_query_model => 'Holiday', |
| 12 | + :lookup_query_method => 'get_activated_users', |
| 13 | + :lookup_query_order => nil, |
| 14 | + :condition => nil, |
| 15 | + :condition_holiday => nil |
| 16 | +} |
| 17 | +$mc_filters['assignee_group'] = { |
| 18 | + :type => 'lookup', |
| 19 | + :label => 'label_group', |
| 20 | + :db_field => 'issues.assigned_to_id', |
| 21 | + :db_field_holiday => 'holidays.user_id', |
| 22 | + :lookup_id => 'id', |
| 23 | + :operators => [:contains, :not_contains], |
| 24 | + :lookup_value => 'lastname', |
| 25 | + :lookup_query_model => 'Holiday', |
| 26 | + :lookup_query_method => 'get_activated_groups', |
| 27 | + :lookup_query_order => nil, |
| 28 | + :condition => '##FIELD_ID## IN (SELECT user_id FROM groups_users WHERE group_id ##OPERATOR## (?)) OR ##FIELD_ID## ##OPERATOR## (?)', |
| 29 | + :condition_holiday => '##FIELD_ID## IN (SELECT user_id FROM groups_users WHERE group_id ##OPERATOR## (?))' |
| 30 | +} |
| 31 | +$mc_filters['status'] = { |
| 32 | + :type => 'lookup', |
| 33 | + :label => 'label_issue_status', |
| 34 | + :db_field => 'issues.status_id', |
| 35 | + :lookup_id => 'id', |
| 36 | + :operators => [:contains, :not_contains], |
| 37 | + :lookup_value => 'name', |
| 38 | + :lookup_query_model => 'IssueStatus', |
| 39 | + :lookup_query_method => 'all', |
| 40 | + :lookup_query_order => "issue_statuses.name ASC", |
| 41 | + :condition => nil, |
| 42 | + :condition_holiday => nil |
| 43 | +} |
| 44 | +$mc_filters['project'] = { |
| 45 | + :type => 'lookup', |
| 46 | + :label => 'label_project', |
| 47 | + :db_field => 'issues.project_id', |
| 48 | + :lookup_id => 'id', |
| 49 | + :operators => [:contains, :not_contains], |
| 50 | + :lookup_value => 'name', |
| 51 | + :lookup_query_model => 'Project', |
| 52 | + :lookup_query_method => 'all', |
| 53 | + :lookup_query_order => "projects.name ASC", |
| 54 | + :condition => nil, |
| 55 | + :condition_holiday => nil |
| 56 | +} |
| 57 | +$mc_filters['tracker'] = { |
| 58 | + :type => 'lookup', |
| 59 | + :label => 'label_tracker', |
| 60 | + :db_field => 'issues.tracker_id', |
| 61 | + :lookup_id => 'id', |
| 62 | + :operators => [:contains, :not_contains], |
| 63 | + :lookup_value => 'name', |
| 64 | + :lookup_query_model => 'Tracker', |
| 65 | + :lookup_query_method => 'all', |
| 66 | + :lookup_query_order => "trackers.name ASC", |
| 67 | + :condition => nil, |
| 68 | + :condition_holiday => nil |
| 69 | +} |
| 70 | +$mc_filters['priority'] = { |
| 71 | + :type => 'lookup', |
| 72 | + :label => 'field_priority', |
| 73 | + :db_field => 'issues.priority_id', |
| 74 | + :lookup_id => 'id', |
| 75 | + :operators => [:contains, :not_contains], |
| 76 | + :lookup_value => 'name', |
| 77 | + :lookup_query_model => 'IssuePriority', |
| 78 | + :lookup_query_method => 'all', |
| 79 | + :lookup_query_order => nil, |
| 80 | + :condition => nil, |
| 81 | + :condition_holiday => nil |
| 82 | +} |
| 83 | +$mc_filters['version'] = { |
| 84 | + :type => 'lookup', |
| 85 | + :label => 'field_version', |
| 86 | + :db_field => 'issues.fixed_version_id', |
| 87 | + :lookup_id => 'id', |
| 88 | + :operators => [:contains, :not_contains], |
| 89 | + :lookup_value => 'name', |
| 90 | + :lookup_query_model => 'Version', |
| 91 | + :lookup_query_method => 'all', |
| 92 | + :lookup_query_order => "versions.name ASC", |
| 93 | + :condition => nil, |
| 94 | + :condition_holiday => nil |
| 95 | +} |
| 96 | +## SNAP - Filters |
| 97 | + |
2 | 98 | require 'vpim' |
3 | 99 | require_dependency Rails.root.join('plugins','mega_calendar','lib','mega_calendar','users_controller_patch') |
4 | 100 | require_dependency Rails.root.join('plugins','mega_calendar','lib','mega_calendar','issues_controller_patch') |
|
7 | 103 | name 'Mega Calendar plugin' |
8 | 104 | author 'Andreas Treubert' |
9 | 105 | description 'Better calendar for redmine' |
10 | | - version '1.9.0' |
| 106 | + version '1.9.1' |
11 | 107 | url 'https://github.com/berti92/mega_calendar' |
12 | 108 | author_url 'https://github.com/berti92' |
13 | 109 | requires_redmine :version_or_higher => '5.0.0' |
|
0 commit comments