Skip to content

Commit cf582da

Browse files
author
Andreas Treubert
committed
fixed #106
1 parent f93b606 commit cf582da

3 files changed

Lines changed: 98 additions & 96 deletions

File tree

‎app/controllers/ticket_time_controller.rb‎

Whitespace-only changes.

‎init.rb‎

Lines changed: 98 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,100 @@
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+
298
require 'vpim'
399
require_dependency Rails.root.join('plugins','mega_calendar','lib','mega_calendar','users_controller_patch')
4100
require_dependency Rails.root.join('plugins','mega_calendar','lib','mega_calendar','issues_controller_patch')
@@ -7,7 +103,7 @@
7103
name 'Mega Calendar plugin'
8104
author 'Andreas Treubert'
9105
description 'Better calendar for redmine'
10-
version '1.9.0'
106+
version '1.9.1'
11107
url 'https://github.com/berti92/mega_calendar'
12108
author_url 'https://github.com/berti92'
13109
requires_redmine :version_or_higher => '5.0.0'

‎lib/mega_calendar/filters.rb‎

Lines changed: 0 additions & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)