use of com.axelor.apps.helpdesk.db.repo.TicketRepository in project axelor-open-suite by axelor.
the class TicketController method timerStateOn.
@Transactional
public void timerStateOn(ActionRequest request, ActionResponse response) {
try {
TicketRepository ticketRepo = Beans.get(TicketRepository.class);
Ticket ticket = request.getContext().asType(Ticket.class);
ticket = ticketRepo.find(ticket.getId());
ticket.setTimerState(true);
ticketRepo.save(ticket);
response.setReload(true);
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
use of com.axelor.apps.helpdesk.db.repo.TicketRepository in project axelor-open-suite by axelor.
the class TicketController method timerStateOff.
@Transactional
public void timerStateOff(ActionRequest request, ActionResponse response) {
try {
TicketRepository ticketRepo = Beans.get(TicketRepository.class);
Ticket ticket = request.getContext().asType(Ticket.class);
ticket = ticketRepo.find(ticket.getId());
ticket.setTimerState(false);
ticketRepo.save(ticket);
response.setReload(true);
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
Aggregations