Bug 841189 - XMLRPC: Unable to update test plan status [NEEDINFO]
XMLRPC: Unable to update test plan status
Status: VERIFIED
Product: TCMS
Classification: Other
Component: Application (Show other bugs)
3.7.0
Unspecified Unspecified
high Severity high
: ---
: 3.8.0
Assigned To: Yang Ren
tools-bugs
: Regression
: 740558 (view as bug list)
Depends On:
Blocks: 841154
  Show dependency treegraph
 
Reported: 2012-07-18 07:28 EDT by Petr Šplíchal
Modified: 2016-05-31 21:49 EDT (History)
7 users (show)

See Also:
Fixed In Version: 3.8.0-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
psplicha: needinfo? (yawli)


Attachments (Terms of Use)

  None (edit)
Description Petr Šplíchal 2012-07-18 07:28:15 EDT
Description of problem:

Seems that TestPlan.update() does not support providing status
(is_active) by Boolean as mentioned in the documentation:

    +-------------------------+----------------+
    | Field                   | Type           |
    +-------------------------+----------------+
    | name                    | String         |
    | type                    | Integer        |
    | product                 | Integer        |
    | default_product_version | Integer        |
    | parent                  | Integer        |
    | is_active               | Boolean        |
    | env_group               | Integer        |
    +-------------------------+----------------+

When I fetch the test plan, the value is correctly Boolean:

>     TestPlan.get(289)
> 
>     {'attachment': [],
>     'author': 'psplicha',
>     'author_id': 2117,
>     'case': [12516, 35267, 46490, 51362, 35269],
>     'component': [],
>     'create_date': '2008-10-22 09:08:38',
>     'default_product_version': '5.6',
>     'env_group': [],
>     'extra_link': '',
>     'is_active': True,
>     'name': 'name1',
>     'owner': 'psplicha',
>     'owner_id': 2117,
>     'parent': None,
>     'parent_id': None,
>     'plan_id': 289,
>     'product': 'Red Hat Enterprise Linux 5',
>     'product_id': 61,
>     'tag': [973],
>     'type': 'Function',
>     'type_id': 3}

But when I try to update I get the following:

>   TestPlan.update(289, {'is_active': True})
>   [['is_active', 'Select a valid choice. True is not one of the available choices.']]

This worked fine before, marking as regression. Could you please
fix this soon? Thanks.

Version-Release number of selected component (if applicable):
Nitrate 3.7.0
Comment 1 Petr Šplíchal 2012-07-25 05:23:02 EDT
Could we get this fixed in 3.8.0?
Comment 2 jianchen 2012-07-26 04:05:47 EDT
(In reply to comment #1)
> Could we get this fixed in 3.8.0?

Now 'is_active' accept 0 or 1, 0: Archived 1: Active (Default 0).
3.8.0 will change to False/True.
Thanks.
Comment 3 jianchen 2012-07-30 22:37:01 EDT
*** Bug 740558 has been marked as a duplicate of this bug. ***
Comment 4 jihu 2012-07-31 03:48:04 EDT
Verify 3.8.0-1 on stage --->Fail

Verify steps:
1.TestPlan.get(6868)
2.TestPlan.update(6868, {'is_active': False})
3.TestPlan.update(6868, {'is_active': True})

Actual result:
>   TestPlan.update(6868, {'is_active': False})
>   [['is_active', 'Select a valid choice. False is not one of the available choices.']]

>   TestPlan.update(6868, {'is_active': True})
>   [['is_active', 'Select a valid choice. True is not one of the available choices.']]

expect result:
it should work fine.
Comment 5 jihu 2012-07-31 03:59:39 EDT
Verify 3.8.0-2 on stage --->Fail

Verify steps:
1.TestPlan.get(6868)
2.TestPlan.update(6868, {'is_active': False})
3.TestPlan.update(6868, {'is_active': True})

Actual result:
>   TestPlan.update(6868, {'is_active': False})
>   [['is_active', 'Select a valid choice. False is not one of the available choices.']]

>   TestPlan.update(6868, {'is_active': True})
>   [['is_active', 'Select a valid choice. True is not one of the available choices.']]

expect result:
it should work fine.
Comment 6 jianchen 2012-08-01 01:37:13 EDT
This bug raise because the patch not yet merge in source code.
Please re-confirm in 3.8.0-3 release.
Comment 7 Xin Gao 2012-08-03 03:02:22 EDT
Verify 3.8.0-2 on stage --->PASS

Verify steps:
1.TestPlan.get(6868)
2.TestPlan.update(6868, {'is_active': False})
3.TestPlan.update(6868, {'is_active': True})

Actual result:
work well now

Note You need to log in before you can comment on or make changes to this bug.