[Soap_api] mc_issue_add custom fields problem

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
tuanklnew
Posts: 5
Joined: 28 Nov 2017, 03:10

[Soap_api] mc_issue_add custom fields problem

Post by tuanklnew »

Hello everyone, I am working on MantisBT client by using Zeep of Python 3 that connect to Soap api of Mantis. On Mantis 2.8, my program call mc_issue_add with no error. Unfortunally, When I upgrade to Mantis 2.10 my program does not work anymore but show error:

Code: Select all

zeep.exceptions.Fault: Cannot use object of type stdClass as array
I used:

Code: Select all

zeep_client.get_type('ns0:IssueData')
to get structure and then put value in it so I think is impossible that something is wrong with my structure.
There is an example of my structure:

Code: Select all

{
    'id': None,
    'view_state': {
        'id': '50',
        'name': 'private'
    },
    'last_updated': datetime.datetime(2018, 1, 12, 8, 55, 16, 404946),
    'project': {
        'id': '1',
        'name': 'test_mantis'
    },
    'category': 'General',
    'priority': {
        'id': '20',
        'name': 'low'
    },
    'severity': {
        'id': '40',
        'name': 'tweak'
    },
    'status': {
        'id': '10',
        'name': 'new'
    },
    'reporter': {
        'id': '1',
        'name': 'administrator',
        'real_name': 'Nguyen Tri Tuan',
        'email': 'root@localhost'
    },
    'summary': 'This is summary for testing',
    'version': None,
    'build': None,
    'platform': None,
    'os': None,
    'os_build': None,
    'reproducibility': None,
    'date_submitted': None,
    'sponsorship_total': None,
    'handler': None,
    'projection': None,
    'eta': None,
    'resolution': None,
    'fixed_in_version': None,
    'target_version': None,
    'description': 'This is description for testing 1',
    'steps_to_reproduce': None,
    'additional_information': 'This is addition information for testing 1',
    'attachments': None,
    'relationships': None,
    'notes': None,
    'custom_fields': [
        {
            'field': {
                'id': '2',
                'name': 'IP Address'
            },
            'value': '192.168.172.9'
        }
    ],
    'due_date': None,
    'monitors': None,
    'sticky': 'false',
    'tags': None
}
I also find out that when I clear my custom fields it will work normally.
Last edited by tuanklnew on 12 Jan 2018, 09:07, edited 1 time in total.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: [Soap_api] mc_issue_add custom fields problem

Post by atrol »

Please create a bug report for it https://www.mantisbt.org/bugs
Please use Search before posting and read the Manual
tuanklnew
Posts: 5
Joined: 28 Nov 2017, 03:10

Re: [Soap_api] mc_issue_add custom fields problem

Post by tuanklnew »

atrol wrote:Please create a bug report for it https://www.mantisbt.org/bugs
I reported bug. But it seems this bug existed from Mantis BT 2.9.0 and my report is duplicated. Unfortunately this bug is still not fixed.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: [Soap_api] mc_issue_add custom fields problem

Post by atrol »

It would be good if you could check if this fixes the issue https://github.com/mantisbt/mantisbt/pull/1268/files
Please use Search before posting and read the Manual
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: [Soap_api] mc_issue_add custom fields problem

Post by atrol »

Please use Search before posting and read the Manual
Post Reply