Esempio n. 1
0
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)
Esempio n. 2
0
File: cli.py Progetto: jaraco/fbcli
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)
Esempio n. 3
0
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)
Esempio n. 4
0
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)