Development

#5508 (Admin Generator: default filters are lost when filters are reset)

You must first sign up to be able to contribute.

Ticket #5508 (closed defect: fixed)

Opened 6 months ago

Last modified 6 months ago

Admin Generator: default filters are lost when filters are reset

Reported by: Jonathan.Franks Assigned to: fabien
Priority: minor Milestone: 1.2.2
Component: generator Version: 1.2.1
Keywords: admin, filter Cc:
Qualification: Design decision

Description

currently, if you set some default filters in the generator configuration class like this...

public function getFilterDefaults() {

return array('published' => 1);

}

and then hit the reset button in the filter form, the default filter values are lost.

the problem is in the generated auto action class on line 52...

$this->setFilters(array());

should be...

$this->setFilters($this->configuration->getFilterDefaults());

Of course, it is a matter of opinion whether this is the correct behavior or not, but in my opinion, the reset button should return the list to the state in which the user first encounters it.

Change History

12/31/08 13:14:53 changed by FabianLange

  • qualification changed from Unreviewed to Design decision.

perhaps there should be a clear and a a reset to allow both behaviours and make it clear and usable.

01/06/09 20:46:01 changed by FabianLange

  • status changed from new to closed.
  • resolution set to fixed.

(In [14512]) [1.2] admin generator resets default filter values correctly. fixed #5508

01/06/09 20:46:06 changed by FabianLange

  • milestone set to 1.2.2.

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.