View Issue Details

IDProjectCategoryView StatusLast Update
0020101mantisbtapi soappublic2018-09-04 01:23
Reporterkellyzhou Assigned Tocommunity  
PrioritynormalSeverityminorReproducibilityunable to reproduce
Status closedResolutionfixed 
Target Version2.17.0Fixed in Version2.17.0 
Summary0020101: mc_filter_search_issues can't filter by date
Description

Use mc_filter_search_issues filter settings to date, but the result is not in accordance with the setting display
How can we set filter by date?

Tagsmantishub

Activities

kellyzhou

kellyzhou

2015-09-11 22:32

reporter   ~0051454

When using WSDL entity to implement mc_filter_search_issues, we set the date condition (2015/9/1~2015/9/10), but the result is not shown as we expect.
Is there any setting (e.g. filter_by_date= on) we should notice?

filterSearchData.setStart_day(BigInteger.valueOf(1));
filterSearchData.setStart_month(BigInteger.valueOf(9));
filterSearchData.setStart_year(BigInteger.valueOf(2015));

filterSearchData.setEnd_day(BigInteger.valueOf(10));
filterSearchData.setEnd_month(BigInteger.valueOf(9));
filterSearchData.setEnd_year(BigInteger.valueOf(2015));

rombert

rombert

2015-09-18 10:44

reporter   ~0051503

What do you expect to receive? Those dates filter on the date_submitted field.

kellyzhou

kellyzhou

2015-09-18 19:31

reporter   ~0051505

Hello,

I hope to get the data from 2015/09/01 to 2015/09/10.
(If I set up the condition for date, I want to specify a range.)
But the result I get doesn’t apply date filter.

To get the result with date filter, what else do I need to use/set up besides these parameters (Start_day,Start_month,Start_year,End_day,End_month,End_year)?

Thank you.

vboctor

vboctor

2016-04-15 01:43

manager   ~0052953

Last edited: 2016-04-15 01:50

@rombert Looks like for dates to take effect in a filter, the filter_by_date flag has to be set. However, our FilterSearchData doesn't expose this field.

There are two options to fix this:

  1. Add the field to the WSDL and pass it to the internal filtering code.
  2. Infer the code from the FilterSearchData containing date fields (i.e. start date or end date is set).

I would rather go with option 2.

rombert

rombert

2016-04-15 16:08

reporter   ~0052964

Option 2 sounds good to me as well

atrol

atrol

2018-08-17 03:28

developer   ~0060445

PR https://github.com/mantisbt/mantisbt/pull/1382

Related Changesets

MantisBT: master 6e178d8f

2018-08-16 22:41

Raimund Herbert

Committer: dregad


Details Diff
Fix filter by date for the soap api

In the soap endpoint “mc_filter_search_issues”, it is possible to
filter the search result by date. At least it is defined in the wsdl.
But as described in the issue 0020101, this parameter has no
effect (yet).

Therefore handle the date parameters manually in the mc_filter_api,
so that it will be appended to the filter.

After this change it is possible to filter the search result by a
date range.

Fixes 0020101
Affected Issues
0020101
mod - api/soap/mc_filter_api.php Diff File