take: assign to self by default if issue is new and has no currently assigned person
This commit is contained in:
parent
e7a55c9ff5
commit
2e3616c2a2
|
@ -222,7 +222,8 @@ def take(issue_number, reference):
|
|||
click.echo('Moved to branch %s' % branch_name)
|
||||
current_user = api.user.get('current')
|
||||
if ((not hasattr(issue, 'assigned_to') or issue.assigned_to.id != current_user.id)
|
||||
and click.confirm('Do you want to assign the issue to yourself ?', default=not hasattr(issue,·'assigned_to'))):
|
||||
and click.confirm('Do you want to assign the issue to yourself ?',
|
||||
default=not hasattr(issue, 'assigned_to') and issue.status == api.nouveau)):
|
||||
issue.assigned_to_id = current_user.id
|
||||
issue.save()
|
||||
if new:
|
||||
|
|
Loading…
Reference in New Issue