[Soap_api] mc_issue_add custom fields problem
Posted: 12 Jan 2018, 04:15
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:
I used: 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:
I also find out that when I clear my custom fields it will work normally.
Code: Select all
zeep.exceptions.Fault: Cannot use object of type stdClass as array
Code: Select all
zeep_client.get_type('ns0:IssueData')
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
}