From af1debe11cf4793bae049ff3ffd63dc906bbc1c9 Mon Sep 17 00:00:00 2001 From: chenjiankun Date: Thu, 28 Dec 2017 01:39:07 +0000 Subject: [ovp-web] Add SUT version number to OVP portal JIRA: DOVETAIL-572 We currently have a label column in the OVP test result view. This allows users to attach a custom label field to their results. It is at the users discretion to fill out this field. We need a separate SUT version column to track the product version number being submitted for official review. The field can be left blank when users upload and share results in a private manner. However, the OVP portal must check that this new 'SUT version' field is populated before results are officially submitted for review. An error message prompting the user to fill out this field if it is blank must be implemented when users submit results for review. Change-Id: I1ca915423a56e8173a3a13f1b84b066cf91d9291 Signed-off-by: chenjiankun --- cvp/opnfv_testapi/resources/test_handlers.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cvp/opnfv_testapi') diff --git a/cvp/opnfv_testapi/resources/test_handlers.py b/cvp/opnfv_testapi/resources/test_handlers.py index 2b5f28c2..b28a15d3 100644 --- a/cvp/opnfv_testapi/resources/test_handlers.py +++ b/cvp/opnfv_testapi/resources/test_handlers.py @@ -218,6 +218,11 @@ class TestsGURHandler(GenericTestHandler): self.finish_request({'code': 403, 'msg': msg}) return + if not test['sut_label']: + msg = 'Please fill out SUT version before submission' + self.finish_request({'code': 403, 'msg': msg}) + return + query['owner'] = curr_user db_keys.append('owner') -- cgit 1.2.3-korg