mc_project_get_issues does not get "Closed" status issues in

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
xipho
Posts: 2
Joined: 08 Aug 2012, 20:31

mc_project_get_issues does not get "Closed" status issues in

Post by xipho »

Hello,
I have a problem with retrieving issues that are of type status closed
I have verified that the issue does exist in my project and calling mc_issue_exist and mc_issue_get both returns successful values
however calling either mc_project_get_issues or the similiar mc_project_get_header_issues does not return any of the closed issues

I'm using mantis 1.2.4 according to the mc_version soap call from mantis connect.

Can anyone help me?
xipho
Posts: 2
Joined: 08 Aug 2012, 20:31

Re: mc_project_get_issues does not get "Closed" status issue

Post by xipho »

I have also verified that other projects with closed issues give me the same result.
e7andy
Posts: 6
Joined: 19 Nov 2012, 15:20
Location: Gothenburg, Sweden
Contact:

Re: mc_project_get_issues does not get "Closed" status issue

Post by e7andy »

Old thread, but I couldn't find an answer to if SOAP method mc_project_get_issues should return issues with status "closed".
None of my MantisBT installations return any closed issues (v.1.2.9 to 1.2.15).

Here are two issues about it:
http://www.mantisbt.org/bugs/view.php?id=14747
http://www.mantisbt.org/bugs/view.php?id=10969
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: mc_project_get_issues does not get "Closed" status issue

Post by atrol »

This should be fixed since 1.2.0, but seems it is not although there are automated test runs for it.
https://github.com/mantisbt/mantisbt/co ... 48982deb65

Please provide the information that rombert requested, but got no feedback.
http://www.mantisbt.org/bugs/view.php?id=14747#c32972

BTW, I removed your signature as it advertises for a commercial product.
Please use Search before posting and read the Manual
e7andy
Posts: 6
Joined: 19 Nov 2012, 15:20
Location: Gothenburg, Sweden
Contact:

Re: mc_project_get_issues does not get "Closed" status issue

Post by e7andy »

atrol wrote:This should be fixed since 1.2.0, but seems it is not although there are automated test runs for it.
https://github.com/mantisbt/mantisbt/co ... 48982deb65

Please provide the information that rombert requested, but got no feedback.
http://www.mantisbt.org/bugs/view.php?id=14747#c32972
I'm running unmodified MantisBT installations and using SoapUI to run the SOAP method mc_project_get_issues so there isn't really any code I can provide.
atrol wrote:BTW, I removed your signature as it advertises for a commercial product.
I understand. Sorry about that.
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: mc_project_get_issues does not get "Closed" status issue

Post by atrol »

I have no time for further investigatioin at the moment.
I sent a reminder to the developer http://www.mantisbt.org/bugs/view.php?id=14747#c39094
Let's wait a while ...
Please use Search before posting and read the Manual
rombert
Posts: 66
Joined: 05 Nov 2009, 08:43

Re: mc_project_get_issues does not get "Closed" status issue

Post by rombert »

Looking at the SOAP call implementation I can see that it directly delegates to filter_get_bug_rows, so there's no filtering involved from the SOAP API. It would be interesting to see:
  • The exact SOAP calls you make
  • What is logged when you enable logging for LOG_FILTERING.
Robert
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: mc_project_get_issues does not get "Closed" status issue

Post by atrol »

mc_project_get_issues delivers some kind of "random" result as the filter parameter is null and the "current" filter is used (whatever current means)
Maybe your current filter has "Hide Status" = "Closed"

Code: Select all

$t_rows = filter_get_bug_rows( $p_page_number, $p_per_page, $t_page_count, $t_bug_count, null, $p_project_id );
Check functions mc_filter_get_issues and mc_project_get_issues_for_user where you can provide a filter.
Please use Search before posting and read the Manual
e7andy
Posts: 6
Joined: 19 Nov 2012, 15:20
Location: Gothenburg, Sweden
Contact:

Re: mc_project_get_issues does not get "Closed" status issue

Post by e7andy »

I've created a filter that will will display all issues including those with status "closed".
When I pass that filter into mc_filter_get_issues I get all issues including the closed ones so they can be fetched.

I haven't found any way to change the current filter so that it by default will display all issues.
Every time I choose [reset filter] in the view issues page the hide status will be changed to "closed (And Above)".

I enabled LOG_FILTERING and did my one and only SOAP call to mc_project_get_issues (a call to mc_filter_get_issues with a filter logged the exact same).

Code: Select all

2014-01-20 13:47 CET filtering START NEW FILTER QUERY
2014-01-20 13:47 CET filtering Simple Filter
2014-01-20 13:47 CET filtering project_ids = @P27
2014-01-20 13:47 CET filtering include sub-projects = 1
2014-01-20 13:47 CET filtering Getting sub-projects for project id @P27
2014-01-20 13:47 CET filtering project_ids after including sub-projects = @P27
2014-01-20 13:47 CET filtering project_ids (with public/private access) = @P27
2014-01-20 13:47 CET filtering project_ids (with public access) = @P
2014-01-20 13:47 CET filtering project query = ( mantis_bug_table.project_id = 27 )
2014-01-20 13:47 CET filtering no view_state query
2014-01-20 13:47 CET filtering no reporter query
2014-01-20 13:47 CET filtering no handler query
2014-01-20 13:47 CET filtering Join operator :  AND 
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: mc_project_get_issues does not get "Closed" status issue

Post by atrol »

e7andy wrote:Every time I choose [reset filter] in the view issues page the hide status will be changed to "closed (And Above)".
There is a configuration option for it

Code: Select all

$g_hide_status_default 	= CLOSED;
Please use Search before posting and read the Manual
e7andy
Posts: 6
Joined: 19 Nov 2012, 15:20
Location: Gothenburg, Sweden
Contact:

Re: mc_project_get_issues does not get "Closed" status issue

Post by e7andy »

atrol wrote:
e7andy wrote:Every time I choose [reset filter] in the view issues page the hide status will be changed to "closed (And Above)".
There is a configuration option for it

Code: Select all

$g_hide_status_default 	= CLOSED;
Embarrassing...I could have checked the config file myself.
I changed it to:

Code: Select all

$g_hide_status_default 	= "";
Removing the config option or setting it to NONE didn't work.
Now mc_project_get_issues returns all issues including the closed ones.

With the method mc_config_get_string with config_var set to hide_status_default I can check the setting and tell the user that he/she can only view closed issues if the configuration option is changed to "".
Note: If the number of closed issues are many the time to handle and display the response will increase.

Thank you for finding out what my problem was.
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: mc_project_get_issues does not get "Closed" status issue

Post by atrol »

This should be the right setting

Code: Select all

$g_hide_status_default  = META_FILTER_NONE;
Please use Search before posting and read the Manual
e7andy
Posts: 6
Joined: 19 Nov 2012, 15:20
Location: Gothenburg, Sweden
Contact:

Re: mc_project_get_issues does not get "Closed" status issue

Post by e7andy »

atrol wrote:This should be the right setting

Code: Select all

$g_hide_status_default  = META_FILTER_NONE;
Thanks, I had some problems finding the correct constant to use.
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: mc_project_get_issues does not get "Closed" status issue

Post by atrol »

e7andy wrote:Thanks, I had some problems finding the correct constant to use.
Me too
Please use Search before posting and read the Manual
Post Reply