Skip to content

Commit

Permalink
update ticket priority
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedAdel999 authored and polonel committed Aug 29, 2022
1 parent f0933d7 commit e81ad23
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/controllers/api/v1/tickets.js
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,17 @@ apiTickets.update = function (req, res) {
return cb()
}
},
function (cb) {
if (!_.isUndefined(reqTicket.priority)) {
ticket.priority = reqTicket.priority._id || reqTicket.priority

ticket.populate('priority', function () {
return cb()
})
} else {
return cb()
}
},
function (cb) {
if (!_.isUndefined(reqTicket.closedDate)) {
ticket.closedDate = reqTicket.closedDate
Expand Down

0 comments on commit e81ad23

Please sign in to comment.