zensana 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/zensana/commands/project.rb +17 -11
- data/lib/zensana/models/asana/attachment.rb +0 -5
- data/lib/zensana/models/zendesk/comment.rb +0 -2
- data/lib/zensana/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: b94c9bb7aedae5805ed90054a3a565bb872d4c73
|
|
4
|
+
data.tar.gz: bfc11506fedbc028540e80e809dcd6ff58b2def4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e9f316b42b0ab2bfca14c28d8b31fdf88ad6cf3273cc6dbb06dd62e39bd6e9551ad3878a4465dea6b6ef536839fc68d8719a81b3b9251e1c8a5b70c7228ecd3
|
|
7
|
+
data.tar.gz: 9c9dba2fd5d2f4bab8b28c36f60adabdf29cc655932802791ab8c122e378e27a0921147cf40c507c0ec534398ecc76f45b77b7507af7df2a38969dbbc3663266
|
|
@@ -157,15 +157,6 @@ using options #{options}
|
|
|
157
157
|
end
|
|
158
158
|
end
|
|
159
159
|
|
|
160
|
-
# if assignee is not an agent then leave unassigned
|
|
161
|
-
if (assignee_key = options[:default_user] || task.attributes['assignee'])
|
|
162
|
-
if (assignee = asana_to_zendesk_user(assignee_key, false))
|
|
163
|
-
unless assignee.attributes && assignee.attributes['role'] != 'end-user'
|
|
164
|
-
assignee = nil
|
|
165
|
-
end
|
|
166
|
-
end
|
|
167
|
-
end
|
|
168
|
-
|
|
169
160
|
# ready to import the ticket now!
|
|
170
161
|
ticket = Zensana::Zendesk::Ticket.new(
|
|
171
162
|
:requester_id => requester.id,
|
|
@@ -180,7 +171,7 @@ using options #{options}
|
|
|
180
171
|
|
|
181
172
|
Task attributes: #{task.attributes}
|
|
182
173
|
EOF
|
|
183
|
-
:assignee_id =>
|
|
174
|
+
:assignee_id => zendesk_assignee_id(task),
|
|
184
175
|
:created_at => task.created_at,
|
|
185
176
|
:tags => flatten_tags(project_tags, section_tags),
|
|
186
177
|
:comments => comments
|
|
@@ -226,6 +217,21 @@ using options #{options}
|
|
|
226
217
|
zendesk
|
|
227
218
|
end
|
|
228
219
|
|
|
220
|
+
# lookup the asana task assignee in zendesk and
|
|
221
|
+
# return their id if they are an agent or admin
|
|
222
|
+
#
|
|
223
|
+
def zendesk_assignee_id(task)
|
|
224
|
+
assignee_id = nil
|
|
225
|
+
if (assignee_key = options[:default_user] || task.attributes['assignee'])
|
|
226
|
+
if (assignee = asana_to_zendesk_user(assignee_key, false))
|
|
227
|
+
if assignee.attributes && assignee.attributes['role'] != 'end-user'
|
|
228
|
+
assignee_id = assignee.attributes['id']
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
assignee_id
|
|
233
|
+
end
|
|
234
|
+
|
|
229
235
|
# download the attachments to the local file system
|
|
230
236
|
# and retry a few times because internet
|
|
231
237
|
# the download process is restartable (idempotent)
|
|
@@ -292,7 +298,7 @@ using options #{options}
|
|
|
292
298
|
end
|
|
293
299
|
|
|
294
300
|
def normalize_it(thing)
|
|
295
|
-
thing.gsub(/(
|
|
301
|
+
thing.downcase.gsub(/([^a-z0-9])+/,'_')
|
|
296
302
|
end
|
|
297
303
|
end
|
|
298
304
|
end
|
data/lib/zensana/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zensana
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Warren Bain
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-04-
|
|
11
|
+
date: 2015-04-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httmultiparty
|