View Issue Details

IDProjectCategoryView StatusLast Update
0027981mantisbtapi soappublic2021-03-07 18:28
Reporterdregad Assigned Todregad  
Status closedResolutionfixed 
Target Version2.25.0Fixed in Version2.25.0 
Summary0027981: mc_issue_update() throws system warning when Project not specified in IssueData

PHP Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Server] Error Type: SYSTEM WARNING,
Error Description: Undefined array key "project" in /home/dregad/dev/mantisbt/soap.php:5

Steps To Reproduce

Test program used to trigger the error

$s = new SoapClient( 'http://localhost/mantis/api/soap/mantisconnect.php?wsdl' );
$u = 'administrator';
$p = 'root';
$s->mc_issue_update( $u, $p, 1234, [] );
TagsNo tags attached.


related to 0027973 closeddregad REST API update issue triggers errors if payload is empty 




2021-02-14 17:22

developer   ~0065108




2021-02-14 20:44

manager   ~0065120

I haven't checked the code again, but as far as I remember the SOAP API expected the full payload of an issue to update it. This is not ideal, and hence, I designed the REST API to allow patching by supplying only the fields to be overwritten. So I would say this is by design and I wouldn't invest in changing this in SOAP API.



2021-02-15 11:00

developer   ~0065125

From my note in PR :

mc_issue_update() throws a Mandatory field 'summary' is missing error when given an empty payload, which is good enough to inform the user that their input is not correct.

Now that is somewhat outside of this PR's scope, but I'm wondering about the reason for this error. I may intend to update another field, so why should I have to provide summary and description ? I don't see a reason for them to be required in this context. What do you think ?

So I would say this is by design and I wouldn't invest in changing this in SOAP API.

OK I'm fine with that, so let's leave current behavior as it is.
The API should not throw system warnings though, so I think the fix I proposed still applies.

Related Changesets

MantisBT: master 328adc84

2021-02-14 15:55:06


Details Diff
Fix system warning in mc_issue_update()

SYSTEM WARNING, Error Description: Undefined array key "project" is
thrown when the given IssueData does not contain project information.

Fixes 0027981
Affected Issues
mod - api/soap/mc_issue_api.php Diff File