View Issue Details

IDProjectCategoryView StatusLast Update
0021618mantisbtcode cleanuppublic2017-01-14 17:45
Reporterdregad 
Assigned Tocproensa 
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Product Version 
Target Version1.3.xFixed in Version2.1.x 
Summary0021618: Duplicate code to determine the default view type
Description

The logic to determine the default view type based on $g_view_filters config option, and use it to set the current filters view_type from the GPC parameter is duplicated in 3 different places:

  • view_filters_page.php
  • return_dynamic_filters.php
  • view_all_set.php

It should be moved into a new API function.

TagsNo tags attached.

Relationships

child of 0021935 resolvedcproensa Filter api refactoring, manage stored filters 

Activities

cproensa

cproensa

2016-08-16 20:08

developer   ~0053824

Last edited: 2016-08-16 20:10

View 2 revisions

Actually, is the whole logic for building a filter that is duplicated across those pages.
See PR 783 that includes a refactor of all that logic into one single point.
precisely: https://github.com/mantisbt/mantisbt/pull/783/commits/d8b7be6cef00021d4250ef6cc8d1b2befb2e70ec

dregad

dregad

2016-10-20 05:58

developer   ~0054298

@cproensa considering the work in progress to refactor filter api in PR https://github.com/mantisbt/mantisbt/pull/862, Im not sure if this issue should remain open (and be referenced as being fixed by one of the commits in your branch), or closed as duplicate of some other issue.

cproensa

cproensa

2016-10-20 07:10

developer   ~0054299

I added a few clean ups to make sure that defaults are defined in one single place.
Tracking in the commits to fix this issue #

dregad

dregad

2016-10-20 11:08

developer   ~0054306

OK, Im reassigning it to you then :-)

Issue History

Date Modified Username Field Change
2016-08-16 18:36 dregad New Issue
2016-08-16 18:36 dregad Status new => assigned
2016-08-16 18:36 dregad Assigned To => dregad
2016-08-16 20:08 cproensa Note Added: 0053824
2016-08-16 20:10 cproensa Note Edited: 0053824 View Revisions
2016-08-28 10:37 atrol Target Version 1.3.1 => 1.3.2
2016-10-02 19:36 atrol Target Version 1.3.2 => 1.3.3
2016-10-20 05:58 dregad Note Added: 0054298
2016-10-20 07:10 cproensa Note Added: 0054299
2016-10-20 11:08 dregad Assigned To dregad => cproensa
2016-10-20 11:08 dregad Note Added: 0054306
2016-10-30 23:23 vboctor Target Version 1.3.3 => 1.3.4
2016-11-20 16:05 cproensa Relationship added child of 0021935
2016-11-27 08:22 dregad Target Version 1.3.4 => 1.3.5
2016-12-30 16:24 atrol Target Version 1.3.5 => 1.3.x
2017-01-14 17:44 cproensa Status assigned => resolved
2017-01-14 17:44 cproensa Resolution open => fixed
2017-01-14 17:44 cproensa Fixed in Version => 2.1.x