redmine_crm 0.0.46 → 0.0.47
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/CHANGELOG +4 -0
- data/lib/redmine_crm/acts_as_taggable/rcrm_acts_as_taggable.rb +7 -1
- data/lib/redmine_crm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69a1fa898e3b5a087d2dd75ad7ef6fe39e28cdde
|
4
|
+
data.tar.gz: 26dbba848e8586993dfc82a0f6f84f446c81699a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29c1d4c2f6b61cd04a6842bae649b85ef9785ab52cd197bfdca70033c21e0b77a413392fefe05436edffea8386be6ba19c50c16bb43d451cc4e7407e6abff70c
|
7
|
+
data.tar.gz: 9bcfba949514d1a2bcc9abc5f6aa6f6be012c74d3abab92a287297869cc14655f65effe73d252f2b38954616f22dc844622b50670f3c9a829ab129dd0559b6cc
|
data/doc/CHANGELOG
CHANGED
@@ -111,8 +111,14 @@ module RedmineCrm
|
|
111
111
|
group_fields << ", #{Tag.table_name}.created_at" if Tag.respond_to?(:created_at)
|
112
112
|
group_fields << ", #{Tag.table_name}.updated_at" if Tag.respond_to?(:updated_at)
|
113
113
|
|
114
|
+
if base_class.respond_to?(:visible_condition)
|
115
|
+
visible_condition = base_class.visible_condition(User.current)
|
116
|
+
if visible_condition.include?('project_id') && join.all? { |jn| jn.exclude?('JOIN projects') }
|
117
|
+
join << "JOIN #{Project.table_name} ON #{Project.table_name}.id = #{table_name}.project_id"
|
118
|
+
end
|
119
|
+
scope = scope.where(visible_condition)
|
120
|
+
end
|
114
121
|
scope = scope.joins(join.join(' '))
|
115
|
-
scope = scope.where(base_class.visible_condition(User.current)) if base_class.respond_to?(:visible_condition)
|
116
122
|
scope = scope.select("#{Tag.table_name}.*, COUNT(DISTINCT #{Tagging.table_name}.taggable_id) AS count")
|
117
123
|
scope = scope.group("#{Tag.table_name}.id, #{Tag.table_name}.name #{group_fields}")
|
118
124
|
scope = scope.having('COUNT(*) > 0')
|
data/lib/redmine_crm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_crm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.47
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RedmineUP
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|