def save(self, *args, **kwargs): self._set_dates() self._set_cycle_lead_times() self._time_in_current_state = None # Blank this self._time_in_current_state = self.time_in_state # Recaclulate and cache self._worked_on = [] # Blank this self._worked_on = self.worked_on # Recaclulate and cache self._type = self.ticket_system.type or app.config.get('DEFAULT_TYPE', '') if self._type: self._type = self._type.strip() self._version = self.ticket_system.get_version() self._assignee = self.ticket_system_data.get('assignee', '') self.title = self.ticket_system_data.get('summary', '') self.key = self.key.upper() ticket_class = self.ticket_system_data.get('service_class', None) if ticket_class: self._service_class = ticket_class ticketdatasync.set_due_date_from_ticket(self, self.ticket_system_data) self._auto_state_changes() super(Kard, self).save(*args, **kwargs)
def save(self, *args, **kwargs): self._set_dates() self._set_cycle_lead_times() self._time_in_current_state = None # Blank this self._time_in_current_state = self.time_in_state # Recaclulate and cache self._worked_on = [] # Blank this self._worked_on = self.worked_on # Recaclulate and cache self._type = self.ticket_system.type or app.config.get( 'DEFAULT_TYPE', '') if self._type: self._type = self._type.strip() self._version = self.ticket_system.get_version() self._assignee = self.ticket_system_data.get('assignee', '') self.title = self.ticket_system_data.get('summary', '') self.key = self.key.upper() ticket_class = self.ticket_system_data.get('service_class', None) if ticket_class: self._service_class = ticket_class ticketdatasync.set_due_date_from_ticket(self, self.ticket_system_data) self._auto_state_changes() super(Kard, self).save(*args, **kwargs)