gitlab_support_readiness 1.0.37 → 1.0.38

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
  SHA256:
3
- metadata.gz: e459cc3f2cb6630193b9782e6d9b679e8cbd9f1700682f52de8345e9a3f4e970
4
- data.tar.gz: 17d46a1beaa0fd0fe550616d8a607b82e298dfa4581f6aaa89dedcfac7d0f373
3
+ metadata.gz: 9b1330c4fb2dc431a85de88f941a158751eb98d45431c567669d0913fe8bacd1
4
+ data.tar.gz: d40b44310ef4c8217507178164924e83faccf9827d843778a1b71b5562b5e313
5
5
  SHA512:
6
- metadata.gz: 660521337677a451df9fdefe8a74e10161bf2ab3c7cbb0c0ba3ddf7b5c82c499d6fecdc679bd79f2c129ed9ae374281bcf299e79de88b0e3b6093df67ed0b49e
7
- data.tar.gz: 14d7ef1485caf2c3f10cc16f1a7015cbb29000bcab4e39691a0796639b86e1243e4c1939012bd3651745172e760e4652c2eb808d49dd475cf13f6e72fa0ff231
6
+ metadata.gz: 2a5ea2c78752e407c81cb86776a1e8d1ee2ac55ee7ebf1acfab7fe4c440c881efac6fcfad72fb1da4d0483c5f31bd8abb663af2d623e13c1387471848e87c445
7
+ data.tar.gz: 1635651da9633d04fd6ef1462ed3e5d233f3a0e5c1234bb674df719ed5eef698476b5f6114d9e052e23cadbcb3b56359eec9336fd80209dd4b8c5ac4518ab779
@@ -52,8 +52,8 @@ module Readiness
52
52
  repo.custom_field_options.map! { |o| Zendesk::TicketFieldOptions.new(o) } unless repo.custom_field_options.first.is_a? Object
53
53
  repo.custom_field_options.each do |repo_option|
54
54
  repo_option.position = repo.custom_field_options.index(repo_option) if repo_option.position.nil?
55
- zd_option = zd_options.detect { |zd_o| zd_o.name == repo_option.name }
56
- if zd_option.nil? || to_clean_json(zd_option) != to_clean_json(repo_option)
55
+ zd_option = zd.custom_field_options.detect { |zd_o| zd_o.value == repo_option.value }
56
+ if zd_option.nil? || option_difference?(zd_option, repo_option)
57
57
  @diffs[:option_updates].push({ "#{repo.title}" => repo_option })
58
58
  end
59
59
  end
@@ -69,6 +69,22 @@ module Readiness
69
69
  @diffs
70
70
  end
71
71
 
72
+ ##
73
+ # Deterine if there is a difference between the repo ticket field options to the Zendesk instance ticket field options
74
+ #
75
+ # @author Jason Colyer
76
+ # @since 1.0.38
77
+ # @param zd_option [Object] An instance of {Readiness::Zendesk::TicketFieldOptions}
78
+ # @param repo_option [Object] An instance of {Readiness::Zendesk::TicketFieldOptions}
79
+ # @return [Boolean]
80
+ def self.option_difference?(zd_option, repo_option)
81
+ return true if zd_option.name != repo_option.name
82
+ return true if zd_option.position != repo_option.position
83
+ return true if zd_option.value != repo_option.value
84
+
85
+ false
86
+ end
87
+
72
88
  ##
73
89
  # Outputs a comparison report
74
90
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_support_readiness
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.37
4
+ version: 1.0.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Colyer