Bug 841189 - XMLRPC: Unable to update test plan status [NEEDINFO]
Summary: XMLRPC: Unable to update test plan status
Keywords:
Status: VERIFIED
Alias: None
Product: TCMS
Classification: Other
Component: Application
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.8.0
Assignee: Yang Ren
QA Contact: Nobody
URL:
Whiteboard:
: 740558 (view as bug list)
Depends On:
Blocks: 841154
TreeView+ depends on / blocked
 
Reported: 2012-07-18 11:28 UTC by Petr Šplíchal
Modified: 2022-03-14 03:26 UTC (History)
5 users (show)

Fixed In Version: 3.8.0-3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:
psplicha: needinfo? (yawli)


Attachments (Terms of Use)

Description Petr Šplíchal 2012-07-18 11:28:15 UTC
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 09:23:02 UTC
Could we get this fixed in 3.8.0?

Comment 2 jianchen 2012-07-26 08:05:47 UTC
(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-31 02:37:01 UTC
*** Bug 740558 has been marked as a duplicate of this bug. ***

Comment 4 jihu 2012-07-31 07:48:04 UTC
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 07:59:39 UTC
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 05:37:13 UTC
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 07:02:22 UTC
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.