Skip to content

Commit b8e8a54

Browse files
DOC Document archive admin filter functionality (#838)
1 parent d6685c9 commit b8e8a54

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

en/08_Changelogs/6.2.0.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ title: 6.2.0 (unreleased)
99
- [Features and enhancements](#features-and-enhancements)
1010
- [Accessibility improvements](#accessibility-improvements)
1111
- [Pass arbitrary attributes with requirements API](#requirements-attributes)
12+
- [Filter archived records](#filter-archived-records)
1213
- [Other new features and enhancements](#other-new)
1314
- [API changes](#api-changes)
1415
- [Bug fixes](#bug-fixes)
@@ -89,6 +90,15 @@ Note that the order of attributes in the `<script>` and `<link>` HTML elements i
8990

9091
If you have implemented a custom requirements backend, we recommend updating it to handle arbitrary attributes passed into the various `$options` parameters.
9192

93+
### Filter archived records
94+
95+
The "Archive" admin section now uses [`GridFieldFilterHeader`](api:SilverStripe\Forms\GridField\GridFieldFilterHeader) and [`SearchContext`](api:SilverStripe\ORM\Search\SearchContext) to allow filtering archived records. The available filters are whatever is defined in [`searchable_fields`](/developer_guides/model/scaffolding/#searchable-fields) for that class, with the below changes:
96+
97+
- For page records, the "Page status" filter field is removed in the archive admin filter form. That filter is used in the "Pages" section to filter by different versioned states, but isn't needed here.
98+
- For all archived records a "Date Archived" filter is added to filter by a range of archive dates.
99+
100+
To facilitate this functionality, we've added a way to add extra searchable field configuration to a `SearchContext` instance through [`SearchContext::addAdditionalFieldSpecs()`](api:SilverStripe\ORM\Search\SearchContext::addAdditionalFieldSpecs()) and [`SearchContext::setAdditionalFieldSpecs()`](api:SilverStripe\ORM\Search\SearchContext::setAdditionalFieldSpecs()). If you implement a custom `SearchContext` subclass, you should use [`SearchContext::getSearchFieldsSpec()`](api:SilverStripe\ORM\Search\SearchContext::getSearchFieldsSpec()) instead of directly calling [`searchableFields()`](api:SilverStripe\ORM\DataObject::searchableFields()).
101+
92102
### Other new features and enhancements {#other-new}
93103

94104
- The `help` plugin is now added by default to all [`TinyMCEConfig`](api:SilverStripe\TinyMCE\TinyMCEConfig) instances. If you were adding it manually, you can remove that custom code. If for some reason you don't want that plugin in one of your configs, you can use [`TinyMCEConfig::disablePlugins()`](api:SilverStripe\TinyMCE\TinyMCEConfig::disablePlugins()) to remove it - but be aware that it is extremely useful for screen reader users to keep this plugin installed.

0 commit comments

Comments
 (0)