diff options
author | Luis Araujo <luis.araujo@collabora.co.uk> | 2016-05-25 15:10:28 (GMT) |
---|---|---|
committer | Luis Araujo <luis.araujo@collabora.co.uk> | 2016-06-01 09:36:20 (GMT) |
commit | bb3cd6748765cacb698dae78c01ff4a4359468df (patch) | |
tree | 8b17c1969c6a7083a2c42be74ed2635baa79aea7 | |
parent | d0794058a9a54f82bcf9d30ea1349f85f51633e7 (diff) | |
download | qa-bughandler-master.tar.gz qa-bughandler-master.tar.xz |
This commit avoids that qa-bughandler updates the bug
unless the status is moving forward.
Reviewed-by: Héctor Orón Martínez <hector.oron@collabora.co.uk>
Signed-off-by: Luis Araujo <luis.araujo@collabora.co.uk>
Differential Revision: https://phabricator.apertis.org/D3282
-rwxr-xr-x | qa-bughandler.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qa-bughandler.py b/qa-bughandler.py index 514a17d..1adffd1 100755 --- a/qa-bughandler.py +++ b/qa-bughandler.py @@ -276,12 +276,15 @@ def do_main(settings): # Only update the status if it moved us forward towards CLOSED and only # update resolution when also doing a status update if settings.cli.args.status is not None: - if compare_status(bug["status"], settings.cli.args.status) >= 0: + if compare_status(bug["status"], settings.cli.args.status) > 0: fields['status'] = settings.cli.args.status - # only handle resolution if a status is given if settings.cli.args.resolution is not None: fields['resolution'] = settings.cli.args.resolution + else: + # Return and do nothing if the status is not moving forward or it is + # the same already set. + return # handle additional fields if settings.cli.args.fields is not None: |