Skip to content

Ticket

A ticket instance represents one ticket of the connected space.

get/create ticket

The class is not publicly constructable, as it always belongs to a TicketSystem object.

Getting an instance for a existing ticket, or creating a new one, is done from a TicketSystem instance. ->For details see here <-

reading data

There are various getters available. Below the globally defined ones are listed, each system specific implementation is free to provide additional ones.

Warning

systems are not guaranteed to support all data, a global getter is defined for. Therefore it can happen, you get an null value back or exception thrown in this case.

method return
getAssignees() Set<TicketAssignee>
getDescription() String
getId() String
getLabels() Set<String>
getParent() TicketSystem
getTitle() String
isOpen() boolean

changing data

You can change data of supported fields through dedicated setters. Every changed field is flagged as changed. To persist the changes to the connected space, you need to call save(). This forms an update request for all flagged fields and returns a new instance of Ticket, formed off the answer from the connected system.

Below the globally defined setters are listed, each system implementation is free to offer more.

method description
addAssignee(String)
removeAssignee(String)
adds/removes assignee, check system specific part, what to pass
addLabel(String) add label
clearAssignees() remove all assignees
open()
close()
opens/closes the ticket
setDescription(String)
setLabels(Set<String>)
setLabels(String[])
replace all labels with the passed ones
setTitle(String)