View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023337 | mantisbt | api soap | public | 2017-09-10 09:37 | 2017-12-01 20:14 |
Reporter | mantisiator | Assigned To | rombert | ||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 2.0.0 | ||||
Summary | 0023337: mc_filter_search_issues returns too many issues when called via curl | ||||
Description | Hi all, Does someone has any hint please ? Thank you very much in advance ! <?xml version="1.0" encoding="UTF-8"?> -<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <username>XXXX</username> | ||||
Tags | No tags attached. | ||||
Seems this is broken, indeed. |
|
@mantisiator - this works in my limited tests with 2.6.0 . Can you retry with an updated version or provide a reproducible test case? Thanks. |
|
Hi @rombert, curl -d @getBRtitle.xml -o getBRtitleRep.xml http://mywebsite.fr/api/soap/mantisconnect.php?WSDL Based on your comment I will cross-check the code changes between the 2 versions. |
|
Hi, |
|
In fact, further to addicitonal testing:
Thanks a lot for your help ! |
|
The 'add to filter' config should control if it is shown in the view issues page. The field should work out-of-the box. Does the user have enough access rights to query that field? Maybe run the query with an admin user to rule out that possibility. |
|
I have performed the test as an admin and do have the same result. |
|
Yes, I tested with 2.6.0 ( actually latest git ) . Can you add your custom field definition? |
|
Hi rombert, Thanks a lot for your support ! |
|
Hi rombert,
only the correct issue is returned, whereas when stting it to 10, 10 issues are returned and amon the 10, the correct one.... What do you think ? |
|
Amendment of preceeding Note: |
|
Hello Rombert, SELECT DISTINCT {bug}.* FROM {bug} JOIN {project} ON {project}.id = {bug}.project_id WHERE {project}.enabled = ? AND ( {bug}.project_id = 11 ) ORDER BY {bug}.last_updated DESC, {bug}.date_submitted DESC |
|
Hello,
filter_api.php L1140 filter_get_bug_count(<array> { ['select'] => <array> { [0] => '{bug}.*' }, ['from'] => <array> { [0] => '{bug}' }, ['join'] => <array> { [0] => ' JOIN {project} ON {project}.id = {bug}.project_id' }, ['where'] => <array> { }, ['where_values'] => <array> { [0] => 1 }, ['project_where'] => <array> { [0] => '{project}.enabled = ?', [1] => '( {bug}.project_id = 11 )' }, ['operator'] => ' AND ', ['order'] => <array> { [0] => '{bug}.last_updated DESC', [1] => '{bug}.date_submitted DESC' } }, <boolean>false) mc_filter_api.php L294 filter_get_bug_rows(<integer>1, <NULL>NULL, <integer>0, <integer>0, <array> { ['_view_type'] => 'advanced', ['project_id'] => <array> { [0] => 11 }, ['custom_fields'] => <array> { [67] => <array> { [0] => '8759' }, [81] => <array> { [0] => 0 }, [78] => <array> { [0] => 0 }, [93] => <array> { [0] => 0 }, [108] => <array> { [0] => 0 }, [98] => <array> { [0] => 0 }, [96] => <array> { [0] => 0 }, [107] => <array> { [0] => 0 }, [101] => <array> { [0] => 0 }, [106] => <array> { [0] => 0 }, [104] => <array> { [0] => 0 }, [97] => <array> { [0] => 0 }, [99] => <array> { [0] => 0 }, [103] => <array> { [0] => 0 }, [100] => <array> { [0] => 0 }, [105] => <array> { [0] => 0 }, [102] => <array> { [0] => 0 }, [76] => <array> { [0] => 0 }, [82] => <array> { [0] => 0 }, [59] => <array> { [0] => 0 }, [61] => <array> { [0] => 0 }, [31] => <array> { [0] => 0 }, [4] => <array> { [0] => 0 }, [54] => <array> { [0] => 0 }, [84] => <array> { [0] => 0 }, [73] => <array> { [0] => 0 }, [75] => <array> { [0] => 0 }, [74] => <array> { [0] => 0 }, [36] => <array> { [0] => 0 }, [72] => <array> { [0] => 0 }, [49] => <array> { [0] => 0 }, [34] => <array> { [0] => 0 }, [35] => <array> { [0] => 0 }, [32] => <array> { [0] => 0 }, [91] => <array> { [0] => 0 }, [2] => <array> { [0] => 0 }, [33] => <array> { [0] => 0 }, [14] => <array> { [0] => 0 }, [65] => <array> { [0] => 0 }, [87] => <array> { [0] => 0 }, [52] => <array> { [0] => 0 }, [90] => <array> { [0] => 0 }, [38] => <array> { [0] => 0 }, [62] => <array> { [0] => 0 }, [68] => <array> { [0] => 0 }, [3] => <array> { [0] => 0 }, [53] => <array> { [0] => 0 }, [80] => <array> { [0] => 0 }, [86] => <array> { [0] => 0 }, [47] => <array> { [0] => 0 }, [60] => <array> { [0] => 0 }, [70] => <array> { [0] => 0 }, [85] => <array> { [0] => 0 }, [55] => <array> { [0] => 0 }, [50] => <array> { [0] => 0 }, [88] => <array> { [0] => 0 }, [79] => <array> { [0] => 0 }, [64] => <array> { [0] => 0 }, [63] => <array> { [0] => 0 }, [9] => <array> { [0] => 0 }, [94] => <array> { [0] => 0 }, [83] => <array> { [0] => 0 }, [5] => <array> { [0] => 0 }, [7] => <array> { [0] => 0 }, [13] => <array> { [0] => 0 }, [42] => <array> { [0] => 0 }, [69] => <array> { [0] => 0 }, [71] => <array> { [0] => 0 }, [43] => <array> { [0] => 0 }, [77] => <array> { [0] => 0 }, [46] => <array> { [0] => 0 }, [6] => <array> { [0] => 0 }, [40] => <array> { [0] => 0 }, [1] => <array> { [0] => 0 }, [89] => <array> { [0] => 0 }, [66] => <array> { [0] => 0 }, [48] => <array> { [0] => 0 }, [8] => <array> { [0] => 0 }, [44] => <array> { [0] => 0 } }, ['_version'] => 'v9', ['per_page'] => 10, ['highlight_changed'] => 6, ['sticky'] => true, ['sort'] => 'last_updated', ['dir'] => 'DESC', ['platform'] => <array> { [0] => '0' }, ['os'] => <array> { [0] => '0' }, ['os_build'] => <array> { [0] => '0' }, ['start_month'] => '10', ['start_day'] => '1', ['start_year'] => '2017', ['end_month'] => '10', ['end_day'] => '16', ['end_year'] => '2017', ['search'] => '', ['filter_by_date'] => false, ['view_state'] => 0, ['relationship_type'] => -1, ['relationship_bug'] => 0, ['tag_string'] => '', ['tag_select'] => '', ['match_type'] => 0, ['category_id'] => <array> { [0] => '0' }, ['severity'] => <array> { [0] => 0 }, ['status'] => <array> { [0] => 0 }, ['reporter_id'] => <array> { [0] => 0 }, ['handler_id'] => <array> { [0] => 0 }, ['note_user_id'] => <array> { [0] => 0 }, ['resolution'] => <array> { [0] => 0 }, ['priority'] => <array> { [0] => 0 }, ['build'] => <array> { [0] => '0' }, ['version'] => <array> { [0] => '0' }, ['hide_status'] => <array> { [0] => -2 }, ['fixed_in_version'] => <array> { [0] => '0' }, ['target_version'] => <array> { [0] => '0' }, ['monitor_user_id'] => <array> { [0] => 0 }, ['profile_id'] => <array> { [0] => 0 } })\nmc_filter_api.php L343 mci_filter_search_get_rows(<string>'47', <Object><stdClass> ( [project_id] => <array> { [0] => 11 }, [custom_fields] => <array> { [0] => <Object><stdClass> ( [field] => <Object><stdClass> ( [id] => 67 ), [value] => <array> { [0] => '8759' } ) } ), <NULL>NULL, <NULL>NULL) UnknownFile L? mc_filter_search_issues(<string>'mallab', <string>'e1u2r3o4c\\', <Object><stdClass> ( [project_id] => <array> { [0] => 11 }, [custom_fields] => <array> { [0] => <Object><stdClass> ( [field] => <Object><stdClass> ( [id] => 67 ), [value] => <array> { [0] => '8759' } ) } ), <NULL>NULL, <NULL>NULL) |
|
@cproensa you may want to have a look at this - the inconsistency could be a consequence of the recent changes to filter api. |
|
Which version exactly is this being reported for? |
|
Hi, |
|
changes to filter_api that dregad says were included in 2.1 |
|
I am planning to do a migraion from January 2018 on. Thanks a lot ! |
|
What's more, when I cross-checked 2.0 ans 2.6 implementation, these seem similar to me. |
|
Hello @cproensa, Putting the custom fields data structure in the query or not has no impact on the quesry result. Question: <?xml version="1.0" encoding="UTF-8"?> -<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> <username>XXXX</username> |
|
Further to a deeper analysis, the problem comes from the funciton filter_get_bug_rows_query_clauses()
which has been changed in 2.7.0 (which explains why the problem was still present in 2.3.0) In fact, the function was not parsing the project defined in the xml query and was therefore not finding the custom field defined in the xml query. |
|
So can this issue be closed then ? |
|
Hi dregad, |
|