def duplicate(): '''Resolve the current ticket as "duplicate".''' assert_operation('resolve') with editor.maybe_writing('Add a comment?') as text: params = text.get_params_for_comment() if text else {} params['ixstatus'] = FBStatus.get_by_name("Resolved (Duplicate)").id CURRENT_CASE.resolve(**params)
def assign(*args): '''Assign the current ticket to someone. Note: `person` must be the person's full name. See command `people` for a list of persons. Example: >>> assign <person> >>> assign Lorenzo Bolla ''' assert_operation('assign') person = ' '.join(args) with editor.maybe_writing('Add a comment?') as text: params = text.get_params_for_comment() if text else {} CURRENT_CASE.assign(person, **params)
def reopen(): '''Reopen the current ticket.''' assert_operation('reopen') with editor.maybe_writing('Add a comment?') as text: params = text.get_params_for_comment() if text else {} CURRENT_CASE.reopen(**params)
def close(): '''Close the current ticket.''' assert_operation('close') with editor.maybe_writing('Add a comment?') as text: params = text.get_params_for_comment() if text else {} CURRENT_CASE.close(**params)