Skip to content

Commit

Permalink
Fix adding attachments and updating dynamic fields of OTRS ticket
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed Jun 26, 2019
1 parent 61034f0 commit aef195f
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/org/camunda/latera/bss/connectors/otrs/types/Ticket.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,20 @@ trait Ticket {
return updateTicket(id, input, attachments, dynamicFields, additionalParams)
}

LinkedHashMap addTicketFiles(def id, List attachments = []) {
return updateTicket(id, [:], [:], attachments)
LinkedHashMap addTicketFile(def id, LinkedHashMap file) {
return addTicketFiles(id, [file])
}

LinkedHashMap addTicketFile(LinkedHashMap file, def id) {
return addTicketFile(id, file)
}

LinkedHashMap addTicketFile(def id, String name, byte[] content) {
return addTicketFile(id, name: name, content: content)
}

LinkedHashMap addTicketFiles(def id, List attachments) {
return updateTicket(id, [:], attachments)
}

LinkedHashMap updateTicketArticle(def id, LinkedHashMap input) {
Expand All @@ -193,7 +205,7 @@ trait Ticket {

LinkedHashMap updateTicketDynamicField(def id, def name, def value = null) {
def dynamicFields = [[name: value]]
return updateTicket(id, [:], dynamicFields)
return updateTicket(id, [:], [], dynamicFields)
}

LinkedHashMap updateTicketDynamicField(LinkedHashMap input, def id) {
Expand Down

0 comments on commit aef195f

Please sign in to comment.