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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ec79f1544566d58c025b791d7ef86d9bf78ab73
4
- data.tar.gz: be352f660d38fddc5818d92e22ae06fda8244448
3
+ metadata.gz: 69a1fa898e3b5a087d2dd75ad7ef6fe39e28cdde
4
+ data.tar.gz: 26dbba848e8586993dfc82a0f6f84f446c81699a
5
5
  SHA512:
6
- metadata.gz: e9bb7dbcbde4808ca94707defdfac09c6e2a7d5eadd64b57f198f5d8991e95b1ef0562e588341bebb356ba1abfce848cc201ca912e8c930909a74b5029153515
7
- data.tar.gz: 1db307a3ccf82eb9b7fc6de0efbb33c6093f14b9ee606ddab87bf4a02ce48e06b693b0f0a450f2ca58968bde397c5d6a3c801d9554e29fc792dcf3d9240c2a2a
6
+ metadata.gz: 29c1d4c2f6b61cd04a6842bae649b85ef9785ab52cd197bfdca70033c21e0b77a413392fefe05436edffea8386be6ba19c50c16bb43d451cc4e7407e6abff70c
7
+ data.tar.gz: 9bcfba949514d1a2bcc9abc5f6aa6f6be012c74d3abab92a287297869cc14655f65effe73d252f2b38954616f22dc844622b50670f3c9a829ab129dd0559b6cc
@@ -4,6 +4,10 @@ Redmine crm gem - general functions for plugins (tags, vote, viewing, currency)
4
4
  Copyright (C) 2011-2019 RedmineUP
5
5
  https://www.redmineup.com/
6
6
 
7
+ == 2019-08-26 v0.0.47
8
+
9
+ * Fixed bug with tag cloud
10
+
7
11
  == 2019-08-14 v0.0.46
8
12
 
9
13
  * select2 update
@@ -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')
@@ -1,3 +1,3 @@
1
1
  module RedmineCrm
2
- VERSION = '0.0.46'
2
+ VERSION = '0.0.47'
3
3
  end
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.46
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-14 00:00:00.000000000 Z
11
+ date: 2019-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails