# HG changeset patch # User Steve Fink # Date 1589643519 25200 # Sat May 16 08:38:39 2020 -0700 # Node ID 206a755a4f30ccdea4d0b0f9dfd586e13068f355 # Parent 34326375ebf661dac4be0820c6c3ecf4ae38c3b0 Add in severity diff --git a/__init__.py b/__init__.py --- a/__init__.py +++ b/__init__.py @@ -137,6 +137,8 @@ b'New bug type (enhancement/defect/task)'), (b'P', b'priority', b'', b'Priority'), + (b'S', b'severity', b'', + b'Severity'), (b'', b'prodversion', b'', b'New bug product version'), (b'', b'cc', b'', @@ -442,6 +444,7 @@ Version: @PRODVERSION@ Type: @TYPE@ Priority: @PRIORITY@ +Severity: @SEVERITY@ CC: @CC@ Depends: @DEPENDS@ Blocks: @BLOCKS@ @@ -468,6 +471,7 @@ Version: @PRODVERSION@ Type: @TYPE@ Priority: @PRIORITY@ +Severity: @SEVERITY@ CC: @CC@ Depends: @DEPENDS@ Blocks: @BLOCKS@ @@ -1184,6 +1188,7 @@ blocks=values['BLOCKS'], bug_type=values['TYPE'], priority=values['PRIORITY'], + severity=values['SEVERITY'], **create_opts) except Exception as e: raise error.Abort(_("error creating bug: %s" % str(e))) @@ -1603,6 +1608,7 @@ values['COMPONENT'] = opts.get('component', '') or ui.config(b'bzexport', b'component', '') values['TYPE'] = opts.get('bugtype') or 'defect' values['PRIORITY'] = opts.get('priority') or 'P3' + values['SEVERITY'] = opts.get('severity') or '--' values['PRODVERSION'] = opts.get('prodversion', '') or ui.config(b'bzexport', b'prodversion', '') values['BLOCKS'] = opts["blocks"].split(",") values['DEPENDS'] = opts["depends"].split(",") diff --git a/bz.py b/bz.py --- a/bz.py +++ b/bz.py @@ -37,7 +37,7 @@ def create_bug(token, product, component, version, title, description, assign_to=None, cc=[], depends=[], blocks=[], - bug_type='defect', priority='P3'): + bug_type='defect', priority='P3', severity='--'): """ Create a bugzilla bug. """ @@ -54,6 +54,7 @@ 'cc': cc, 'type': bug_type, 'priority': priority, + 'severity': severity, } if assign_to: