View Issue Details

IDProjectCategoryView StatusLast Update
0011133mantisbtapi soappublic2010-02-22 14:34
Reporterworschtsupp Assigned Torombert  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
OSWinXP 
Product Version1.2.0rc2 
Target Version1.2.0Fixed in Version1.2.0 
Summary0011133: Mantis Connector: PHP Fatal error: Cannot use object of type BugData as array
Description

Reproduced with 1.2.0RC2 and git (approx. 6th November 18h):
Using Eclipse 3.5.1, MantisConnect, you get an http-500-internal-Server-Error when fetching the bugs from Mantis. In the apache error-log you can see

Mantis Connector: PHP Fatal error: Cannot use object of type BugData as array

This happens in /api/soap/mc_project_api.php at the following code:
line 700 function mc_project_get_issue_headers ...
at those line:

$t_issue['resolution'] = $t_issue_data->resolution;

$t_issue['attachments_count'] = count( mci_issue_get_attachments( $t_issue_data['id'] ) );
$t_issue['notes_count'] = count( mci_issue_get_notes( $t_issue_data['id'] ) );

If you comment them out it's ok.

Additional Information

Think this is related to 0010615

I changed the two lines to
$t_issue['attachments_count'] = count( mci_issue_get_attachments( $t_issue_data->id ) );
$t_issue['notes_count'] = count( mci_issue_get_notes( $t_issue_data->id ) );

So if a bug has notes, I get a value "1", regardless how many notes a bug has.
Cause I'm no php-Specialist, this seems to be wrong.

TagsNo tags attached.

Relationships

has duplicate 0011295 closedgiallu mc_project_get_issue_headers 

Activities

rombert

rombert

2009-11-09 14:53

reporter   ~0023623

Verified with latest 1.2.x trunk.

rombert

rombert

2009-11-09 15:10

reporter   ~0023624

Fixed, thanks for the report.

I verified both the header retrieval and the note count after making the changes you suggested, please check again with a more recent git version.

worschtsupp

worschtsupp

2009-11-10 14:10

reporter   ~0023640

Thanks, too. Aproved with trunk 1.3dev. I took the wrong trunk by accident, but I assume it to be ok in 1.2.x, too.
Number of notes now correct in Eclipse, number of attatchments does not show up, but maybe not part of the Eclipse-View, so no problem.

By the way: when I try to open details double-klciking in MantisConnector-View I always get an
org.xml.sax.SAXException: Invalid element in org.mantisbt.connect.axis.IssueData - target_version
That happens in 1.2.RC2, too.

Is this a known problem or shall I open a new bug?

rombert

rombert

2009-11-10 14:57

reporter   ~0023641

Is this MantisConnect ( http://www.futureware.biz/mantisconnect/ ) or the Mylyn-Mantis connector ( https://sourceforge.net/apps/mediawiki/mylyn-mantis/index.php?title=Main_Page ) ?

The WSDL has changed ( unfortunate, but it was missing fields ) and the client applications need to regenerate their stub using the new WSDL. Please report this issue to their bug trackers.

worschtsupp

worschtsupp

2009-11-10 16:40

reporter   ~0023646

It's both, but mylyn-mantis is my "target-solution". Therefor we'll meet again at https://sourceforge.net/apps/mantisbt/mylyn-mantis/view.php?id=96, I suppose :-)

Related Changesets

MantisBT: master-1.2.x fc1b513d

2009-11-09 14:53

rombert


Details Diff
Fixes 0011133: mc_project_get_issue_headers does not wholly use BugData

Two remaining occurences of array access have been fleshed out
in mc_project_get_issue_headers.

Two tests have been added, to verify correct behaviour and to
validate another reported issue - incorrect note count.
Affected Issues
0011133
mod - api/soap/mc_project_api.php Diff File
mod - tests/soap/FilterTest.php Diff File

MantisBT: master d4ebd61b

2009-11-09 14:53

rombert


Details Diff
Fixes 0011133: mc_project_get_issue_headers does not wholly use BugData

Two remaining occurences of array access have been fleshed out
in mc_project_get_issue_headers.

Two tests have been added, to verify correct behaviour and to
validate another reported issue - incorrect note count.
Affected Issues
0011133
mod - api/soap/mc_project_api.php Diff File
mod - tests/soap/FilterTest.php Diff File