Skip to content

Commit 64d82dc

Browse files
committed
adds values to request object
1 parent 3bd4b62 commit 64d82dc

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

assets/javascripts/gtt_print.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,25 +157,32 @@ $(function() {
157157
}
158158
});
159159

160+
// Handle attachemnts
161+
requestData.attributes["attachments"] = [];
160162
if (data.issue.attachments) {
161163
$.each(data.issue.attachments, function (key,attachment) {
162164
var content_type = attachment.content_type.split("/"); // Can be done better?
163165
if (content_type[0] === "image") {
164166
// ToDo pass attachment information
165-
console.log(key,attachment);
167+
requestData.attributes["attachments"].push(attachment);
166168
}
167169
});
168170
}
169171

172+
// Handle journals (notes)
173+
requestData.attributes["journals"] = [];
170174
if (data.issue.journals) {
171175
$.each(data.issue.journals, function (key,journal) {
172176
if (journal.notes) {
173177
// ToDo pass journal information
174-
console.log(key,journal);
178+
requestData.attributes["journals"].push(journal);
175179
}
176180
});
177181
}
178182

183+
// Experimental
184+
requestData.attributes["project"] = data.issue.project;
185+
179186
console.log(requestData);
180187
var startTime = new Date().getTime();
181188

0 commit comments

Comments
 (0)