View Issue Details

IDProjectCategoryView StatusLast Update
0009805mantisbtapi soappublic2010-04-23 23:22
Reporterrombert Assigned Torombert  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionunable to reproduce 
Product Version1.2.0a2 
Summary0009805: Unable to retrieve issue headers for filter without criteria
Description

But I can't retrieve any issue headers using a filter

When requesting:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" [^] xmlns:xsd="
;http://www.w3.org/2001/XMLSchema" [^] xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope [^]
/" xmlns:man="http://futureware.biz/mantisconnect"> [^]
<soapenv:Header/>
<soapenv:Body>
<man:mc_filter_get_issue_headers soapenv:encodingStyle="http://schemas.xmlsoap.org/soa [^]
p/encoding/">
<username xsi:type="xsd:string">administrator</username>
<password xsi:type="xsd:string">root</password>
<project_id xsi:type="xsd:integer">1</project_id>
<filter_id xsi:type="xsd:integer">1</filter_id>
<page_number xsi:type="xsd:integer">1</page_number>
<per_page xsi:type="xsd:integer">50</per_page>
</man:mc_filter_get_issue_headers>
</soapenv:Body>
</soapenv:Envelope>

I get back

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" [^] x
mlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" [^] xmlns:xsd="http://www.w3.or [^]
g/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" [^] xmlns:SOAP-EN
C="http://schemas.xmlsoap.org/soap/encoding/"> [^]
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode xsi:type="xsd:string">Server</faultcode>
<faultactor xsi:type="xsd:string"/>
<faultstring xsi:type="xsd:string">Invalid Filter</faultstring>
<detail xsi:type="xsd:string"/>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

TagsNo tags attached.

Activities

rombert

rombert

2008-11-12 14:49

reporter   ~0019857

Any dev, do you know if the database schema is stable enough for me to try a git bisect between the 1.1.2 ( known good ) and 1.2.0a2 ( known bad) ?

vboctor

vboctor

2008-11-14 02:17

manager   ~0019884

There are database schema changes between 1.1.2 and 1.2.0a2.

rombert

rombert

2008-11-14 02:24

reporter   ~0019885

Can I somehow apply the schema changes step-by-step? I see no instructions at http://www.mantisforge.org/dev/manual/en/developers/dev.database.install.html

rombert

rombert

2008-11-20 09:50

reporter   ~0019954

I've narrowed it down to the fact that the soap api expects the filter_string to contain a '#' if the filter is valid, when in fact a filter with no filter criteria has a filter_string of '0', as seen in

mysql> select * from mantis_filters_table where id = 1;
+----+---------+------------+-----------+------------+---------------+
| id | user_id | project_id | is_public | name | filter_string |
+----+---------+------------+-----------+------------+---------------+
| 1 | 1 | 0 | 1 | All issues | 0 |
+----+---------+------------+-----------+------------+---------------+
1 row in set (0.00 sec)

Then in mc_filter_api, line 152 we have

        $t_filter_detail = explode( '#', $t_filter, 2 );

    if( !isset( $t_filter_detail[1] ) ) {
            return new soap_fault( 'Server', '', 'Invalid Filter ( id = '.$p_filter_id.')' );
    }</pre>

So I think that the issue title should be changed to 'Unable to retrieve issue headers for filter without criteria'.

I'm not sure about the fix though. Perhaps the serialization code simply needs to write a proper filter_string entry for such a filter. Let me know if you agree and I'll start digging.

rombert

rombert

2009-10-26 17:40

reporter   ~0023364

No idea how I ended up creating this bug, but:

  1. I can't create that filter using the web interface anymore
  2. Manually adding such a filter result in a web interface error: 'The filter you are trying to use is too old to be upgraded, please re-create it'