def _rename_milestone(self, milestone, old_name): try: doc = self.build_doc(milestone) search_api = BloodhoundSearchApi(self.env) with search_api.start_operation() as operation_context: search_api.change_doc_id(doc, old_name, operation_context) TicketIndexer(self.env).reindex_tickets( search_api, operation_context, milestone=milestone.name) except Exception, e: if self.silence_on_error: self.log.error("Error occurs during renaming milestone from \ %s to %s. The error will not be propagated. Exception: %s", old_name, milestone.name, e) else: raise
def _rename_milestone(self, milestone, old_name): try: doc = self.build_doc(milestone) search_api = BloodhoundSearchApi(self.env) with search_api.start_operation() as operation_context: search_api.change_doc_id(doc, old_name, operation_context) TicketIndexer(self.env).reindex_tickets( search_api, operation_context, milestone=milestone.name) except Exception, e: if self.silence_on_error: self.log.error( "Error occurs during renaming milestone from \ %s to %s. The error will not be propagated. Exception: %s", old_name, milestone.name, e) else: raise
def _component_changed(self, component, old_values): if "name" in old_values: old_name = old_values["name"] try: search_api = BloodhoundSearchApi(self.env) with search_api.start_operation() as operation_context: TicketIndexer(self.env).reindex_tickets( search_api, operation_context, component=component.name) except Exception, e: if self.silence_on_error: self.log.error( "Error occurs during renaming Component \ from %s to %s. The error will not be propagated. \ Exception: %s", old_name, component.name, e) else: raise
def _component_changed(self, component, old_values): if "name" in old_values: old_name = old_values["name"] try: search_api = BloodhoundSearchApi(self.env) with search_api.start_operation() as operation_context: TicketIndexer(self.env).reindex_tickets( search_api, operation_context, component=component.name) except Exception, e: if self.silence_on_error: self.log.error("Error occurs during renaming Component \ from %s to %s. The error will not be propagated. \ Exception: %s", old_name, component.name, e) else: raise