Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Lukas Wiest
unified-ticketing
Commits
d924ead9
Verified
Commit
d924ead9
authored
Nov 26, 2020
by
Lukas Wiest
🚂
Browse files
refactor(docs): api: core: write 'Ticket'
parent
ec2a775d
Pipeline
#1376
passed with stages
in 1 minute and 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
docs/api/core/ticket.md
View file @
d924ead9
# Ticket
!!! todo
write usage api docs
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 <-
](
./ticket-system.md
)
## 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)`
<br/>
`removeAssignee(String)`
| adds/removes assignee, check system specific part, what to pass |
|
`addLabel(String)`
| add label |
|
`clearAssignees()`
| remove all assignees |
|
`open()`
<br/>
`close()`
| opens/closes the ticket |
|
`setDescription(String)`
| |
|
`setLabels(Set<String>)`
<br/>
`setLabels(String[])`
| replace all labels with the passed ones |
|
`setTitle(String)`
| |
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment