[Soap_api] mc_issue_add custom fields problem

General discussion of Mantis.

Moderators: Contributor, Developer

Post Reply
tuanklnew
Posts: 5
Joined: Nov 27, 2017 10:10 pm

[Soap_api] mc_issue_add custom fields problem

Post by tuanklnew » Jan 11, 2018 11:15 pm

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 Jan 12, 2018 4:07 am, edited 1 time in total.

atrol
Site Admin
Posts: 7172
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: [Soap_api] mc_issue_add custom fields problem

Post by atrol » Jan 12, 2018 3:04 am

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: Nov 27, 2017 10:10 pm

Re: [Soap_api] mc_issue_add custom fields problem

Post by tuanklnew » Jan 12, 2018 5:53 am

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: 7172
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: [Soap_api] mc_issue_add custom fields problem

Post by atrol » Jan 13, 2018 4:48 am

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: 7172
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: [Soap_api] mc_issue_add custom fields problem

Post by atrol » Jan 13, 2018 4:58 am

Please use Search before posting and read the Manual

Post Reply