View Issue Details

IDProjectCategoryView StatusLast Update
0024961mantisbtapi restpublic2023-10-19 12:16
Reporterforcead Assigned Tovboctor  
PrioritynormalSeveritytrivialReproducibilityalways
Status assignedResolutionopen 
Product Version2.18.0 
Summary0024961: Get issues matching filter
Description

{{url}}/api/rest/issues?filter_id=623 [dregad - edited per 0024961:0060928]

when I create a filter in mantis for a specific project, in mantis it only returns an issue of the project that I have requested, but when I ask through the APIREST the same filter, it returns all the issues of all the projects that match the filter

v9#{"_version":"v9","_view_type":"advanced","category_id":["0"],"severity":[0],"status":[10,50,80],"per_page":50,"highlight_changed":6,"reporter_id":[0],"handler_id":[827],"project_id":[-3],"sort":"last_updated","dir":"DESC","filter_by_date":false,"start_month":11,"start_day":1,"start_year":2018,"end_month":11,"end_day":2,"end_year":2018,"filter_by_last_updated_date":false,"last_updated_start_month":11,"last_updated_start_day":1,"last_updated_start_year":2018,"last_updated_end_month":11,"last_updated_end_day":2,"last_updated_end_year":2018,"search":"","hide_status":[-2],"resolution":[0],"build":["0"],"version":["0"],"fixed_in_version":["0"],"target_version":["0"],"priority":[0],"monitor_user_id":[0],"view_state":0,"custom_fields":{"1":["0"],"2":["0"],"10":["0"],"6":["0"],"7":["0"],"9":["0"],"11":["0"],"12":["0"],"14":["0"],"15":["0"],"16":["0"],"17":["0"],"84":["0"],"85":["0"],"86":["0"],"87":["0"],"88":["0"],"89":["0"],"90":["0"],"91":["0"],"92":["0"],"67":["0"],"68":["0"],"69":["0"],"70":["0"],"71":["0"],"72":["0"],"73":["0"],"74":["0"],"75":["0"],"76":["0"],"77":["0"],"78":["0"],"79":["0"],"80":["0"],"81":["0"],"82":["0"],"83":["0"]},"sticky":true,"relationship_type":-1,"relationship_bug":0,"profile_id":[0],"platform":["0"],"os":["0"],"os_build":["0"],"tag_string":"","tag_select":0,"note_user_id":[0],"match_type":0}

TagsNo tags attached.
Attached Files
filter in bd.PNG (20,642 bytes)   
filter in bd.PNG (20,642 bytes)   
filter in mantis.PNG (86,518 bytes)   
filter in mantis.PNG (86,518 bytes)   
filter in postman.PNG (66,197 bytes)   
filter in postman.PNG (66,197 bytes)   
edit filter in mantis.PNG (91,351 bytes)   
edit filter in mantis.PNG (91,351 bytes)   

Activities

forcead

forcead

2018-11-06 04:20

reporter   ~0060928

sorry in description i made a mistake
change
{{url}}/api/rest/issues?filter_id=620
by
{{url}}/api/rest/issues?filter_id=623

forcead

forcead

2018-12-13 07:34

reporter   ~0061075

this problem has not happened to anyone? Maybe, I explained wrong

vboctor

vboctor

2019-07-04 20:42

manager   ~0062359

This reminds with some filtering behavior that @cproensa mentioned before.

newtondino

newtondino

2023-10-18 11:42

reporter   ~0068247

This happens to me using MantisHub version 2.25.2

Is there any chance this can be resolved? It makes this particular API useless.

newtondino

newtondino

2023-10-18 11:53

reporter   ~0068250

Last edited: 2023-10-18 12:01

I just read the code and found that project_id is accepted in the URL and will do the work of restricting to a specific project.

Eg
https://xxx.mantishub.io/api/rest/issues?filter_id=478&project_id=25&page_size=50&page=1

The postman doc says:
"Filtering by project or filter is supported since MantisBT 2.5.0"

but the PARAMS section does not include project_id

Can someone please update the doc.

dregad

dregad

2023-10-19 12:16

developer   ~0068254

Thanks for the analysis and feedback @newtondino.

@vboctor I let you take care of the API doc update on Postman and close the issue