Can't get my head around this filter issue!

Get help from other users here.

Moderators: Contributor, Developer

Can't get my head around this filter issue!

Postby MrZZY » May 05, 2016 6:31 am

My statuses are

New
Investigating
Not an issue
Fixing
Documenting
Awaiting reprint
Published

If I am on 'View Issues" in a project, and switch to another, the filter always default to hide status "Published (and above)". My understanding was that the filter defaults to the setting last used when viewing that project. This doesn't seem to be the case, I can refilter, leave the project, return to the project, and it's back to showing "Published (and above)" again. This means that to see every status I have to choose a pre-configured filter each time I switch projects, making it a two step action every time. This is a pain as I have a lot of projects (issue tracking many books).

Any idea what is going on? Or am I misunderstanding this at a basic level?
Attachments
Screenshot 2016-05-05 12.28.59.png
Screenshot 2016-05-05 12.28.59.png (13.71 KiB) Viewed 3099 times
MrZZY
 
Posts: 10
Joined: Feb 08, 2015 3:06 pm

Re: Can't get my head around this filter issue!

Postby aavagyan » May 05, 2016 1:09 pm

Your 'Published' is equivalent of 'Closed'. Filter by default hides closed issues. There is $g_hide_status_default = CLOSED; setting in config, which controls this. I quickly checked filter_api.php - looks like there is no config setting to disable this feature completely. So here is my proposal. Create another status with value being more than 'Published' -> for example 200. Say 'Archived' -> something you wouldn't mind to keep hidden. Then set $g_hide_status_default to that state. Should work.
Mantis Statistics Plugin: https://www.mantisstats.org
aavagyan
 
Posts: 84
Joined: Dec 08, 2013 9:23 am
Location: Germany

Re: Can't get my head around this filter issue!

Postby MrZZY » May 05, 2016 3:20 pm

Ah yes, that makes sense, I understand the logic. Many thanks. I'll give that a go!
MrZZY
 
Posts: 10
Joined: Feb 08, 2015 3:06 pm

Re: Can't get my head around this filter issue!

Postby MrZZY » May 06, 2016 12:27 pm

I've been working on this a while and can't quite get it to work, it's still default to published (and above).

I understand that I don't have to moved the $g_hide_status_default reference from config_defaults_inc.php as it is overidden in config_inc.php. Maybe I'm just not referencing the new status correctly, although out of desperation I tried the following:
$g_hide_status_default = ARCHIVED
$g_hide_status_default = archived
$g_hide_status_default = Archived
$g_hide_status_default = 'Archived'
$g_hide_status_default = 200

I've added the following and I can see that the new 'Archived' status is showing in mantis, but I'm still not getting $g_hide_status_default to filter on the new archived

in custom_strings_inc.php
$s_status_enum_string = '10:New,20:Investigating,30:Not an issue,50:Fixing,70:Documenting,80:Awaiting reprint,90:Published,200:Archived';

in config_inc.php
$g_status_enum_string = '10:new,20:investigating,30:notanissue,50:fixing,70:documenting,80:awaitingreprint,90:published,200:archived';
$g_hide_status_default = ARCHIVED;
MrZZY
 
Posts: 10
Joined: Feb 08, 2015 3:06 pm

Re: Can't get my head around this filter issue!

Postby aavagyan » May 06, 2016 12:59 pm

I think you did most of the right things. Indeed - don't touch $g_hide_status_default file. The following should work - just clear site cookies to be on safe side.

*********************
In config_inc.php.

$g_hide_status_default = ARCHIVED;

$g_status_colors = array(
'new' => '#fcbdbd',
'feedback' => '#e3b7eb',
'acknowledged' => '#ffcd85',
'confirmed' => '#fff494',
'assigned' => '#c2dfff',
'resolved' => '#d2f5b0',
'closed' => '#c9ccc4',
'archived' => '#cc0000');

$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,90:closed',95:archived;

*********************
Create following file in root mantis folder:
custom_constant_inc.php

<?php

define ( 'ARCHIVED', 95 );

?>

*********************
Create following file in root mantis folder:
custom_strings_inc.php

<?php
$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,90:closed',95:archived;

$s_archived_bug_button = "Issue is archived";
$s_archived_bug_title = "Set Issue archived";
$s_email_notification_title_for_status_bug_archived = "The following issue is archived.";
?>
Mantis Statistics Plugin: https://www.mantisstats.org
aavagyan
 
Posts: 84
Joined: Dec 08, 2013 9:23 am
Location: Germany

Re: Can't get my head around this filter issue!

Postby MrZZY » May 06, 2016 7:01 pm

aavagyan - thank you so much for taking the time, your last answer provided the final solution and I now have this working. I try my best with these things but I don't find them as easy! I really appreciate you taking the time to put me on the right path. :)
MrZZY
 
Posts: 10
Joined: Feb 08, 2015 3:06 pm

Re: Can't get my head around this filter issue!

Postby aavagyan » May 07, 2016 1:05 am

You are welcome! :-)
Mantis Statistics Plugin: https://www.mantisstats.org
aavagyan
 
Posts: 84
Joined: Dec 08, 2013 9:23 am
Location: Germany

Re: Can't get my head around this filter issue!

Postby raymond » Nov 17, 2017 10:38 am

For what it's worth.
I was looking for a solution for the same problem, but I didn't like this one. So I did a bit more digging in filter_api.php...

My solution:
$g_hide_status_default = META_FILTER_NONE;

That's it :D
raymond
 
Posts: 4
Joined: Aug 04, 2017 6:24 am

Re: Can't get my head around this filter issue!

Postby MrZZY » Nov 17, 2017 5:29 pm

raymond wrote:For what it's worth.
I was looking for a solution for the same problem, but I didn't like this one. So I did a bit more digging in filter_api.php...

My solution:
$g_hide_status_default = META_FILTER_NONE;

That's it :D


Thanks!
MrZZY
 
Posts: 10
Joined: Feb 08, 2015 3:06 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 20 guests