redmine_remotes 0.15.4 → 0.15.5

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: 0f38544d7fbde4e26f3009ddb4797e11c7998bfa74057f45ad4fe150a1aec633
4
- data.tar.gz: 4e82fa2b04e341cef549c1a7f2c58412f12b271ab4b4cd1f517c663dfa75ad52
3
+ metadata.gz: 67c1e068d64cc326ac7e91e6671c1119e9eba78e7b4f6e94fa24b668087fc8ae
4
+ data.tar.gz: 6fed8dde840f7671c78dd7d407e0246eaf6c87b431dca3d930074597e7ae1842
5
5
  SHA512:
6
- metadata.gz: 425bbef66d7f2690ab0132075f00593ea6643e1802bd69c7eba2e811b0bf80ece6770437751f51b8e12ceb1e8345f528c57cdadedf0316f692daf47a3c1da92e
7
- data.tar.gz: 5bed245c63e7918e764ce4369849f89a6006bbcf2cb34e3d95017552b01a6eeedc2f5451694f6d76d62fa2b3648bd77f4b0405990640df03e58c5d7f8f62a801
6
+ metadata.gz: e3e6bb227b50856865c4c563c74be4994746d11e8b6248a483e6105e1b34f1957398a744c1309f83b090fef58548bb38fc42956cf76a65e9713f25b99521c23a
7
+ data.tar.gz: d61bd4b29a09a82277a6299999068724fd1b870f1d074e6ddd33f31830ae15e851fe5f94d064e8e74471ce10a1c955f4930b4d9dece81b0f59f300e011a2457e
@@ -6,11 +6,16 @@ module RedmineRemotes
6
6
  module Esosti
7
7
  module Entities
8
8
  class Issue < ::Avmtrf1::Esosti::Entities::Issue
9
+ DEFAULT_TYPE_FOR_URL_PREFIX = '_unmapped_'
9
10
  EXTRA_DESCRIPTION_BEFORE = { reported_by: 'Relatado por', affected_person: 'Pessoa afetada',
10
11
  type_description: 'Tipo de solicitação' }.freeze
12
+ TYPES_FOR_URL = {
13
+ 'INCIDENTE' => 'ms_incident',
14
+ 'SS' => 'ms_sr'
15
+ }.freeze
11
16
 
12
17
  def human_view_url
13
- instance.issue_human_view_url(uid)
18
+ instance.issue_human_view_url(type_for_url, uid)
14
19
  end
15
20
 
16
21
  def author_login
@@ -63,6 +68,14 @@ module RedmineRemotes
63
68
  description.gsub(/\s+/, ' ')
64
69
  end
65
70
 
71
+ def type_for_url
72
+ TYPES_FOR_URL[type_class] || "#{DEFAULT_TYPE_FOR_URL_PREFIX}#{type_class}"
73
+ end
74
+
75
+ def type_class
76
+ attributes.fetch('CLASS')
77
+ end
78
+
66
79
  def type_description
67
80
  attributes.fetch('DESCRIPTION')
68
81
  end
@@ -17,8 +17,8 @@ module RedmineRemotes
17
17
  end
18
18
  end
19
19
 
20
- def issue_human_view_url(ticket_uid)
21
- "#{root_url}/itsm/ui/?event=loadapp&value=ms_sr&uniqueid=#{ticket_uid}"
20
+ def issue_human_view_url(ticket_type, ticket_uid)
21
+ "#{root_url}/itsm/ui/?event=loadapp&value=#{ticket_type}&uniqueid=#{ticket_uid}"
22
22
  end
23
23
 
24
24
  def fetch_issues_changed(start_time, _end_time)
@@ -3,7 +3,7 @@
3
3
  module RedmineRemotes
4
4
  SLUG = 'redmine_remotes'
5
5
  NAME = 'Redmine Remotes'
6
- VERSION = '0.15.4'
6
+ VERSION = '0.15.5'
7
7
  AUTHOR = 'Eduardo Henrique Bogoni'
8
8
  SUMMARY = 'Integração do Redmine com trackers diversos.'
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_remotes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.4
4
+ version: 0.15.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Henrique Bogoni