antonyantonio - add priority ticket backend[skip ci]

This commit is contained in:
ivan 2016-09-29 17:09:34 -03:00
parent 9fba1562ea
commit be8374fd9a
2 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,7 @@ class Ticket extends DataStore {
'date',
'unread',
'closed',
'priority',
'author',
'owner',
'ownTicketeventList'
@ -32,6 +33,7 @@ class Ticket extends DataStore {
public function getDefaultProps() {
return array(
'owner' => null,
'priority' => 'low',
'ticketNumber' => $this->generateUniqueTicketNumber()
);
}
@ -71,6 +73,7 @@ class Ticket extends DataStore {
'language' => $this->language,
'unread' => !!$this->unread,
'closed' => !!$this->closed,
'priority' => $this->priority,
'author' => $this->authorToArray(),
'owner' => $this->ownerToArray(),
'events' => $this->eventsToArray()

View File

@ -100,6 +100,7 @@ describe '/ticket/create' do
(ticket['content']).should.equal('The north remembers')
(ticket['unread']).should.equal('0')
(ticket['closed']).should.equal('0')
(ticket['priority']).should.equal('low')
(ticket['department_id']).should.equal('1')
(ticket['author_id']).should.equal($csrf_userid)
(ticket['ticket_number'].size).should.equal(6)