Skip to content

Assets Group By Type PR Review

Ed Mozley edited this page Nov 14, 2026 · 1 revision

Group the asset list by type - PR review

PR #340 by vsc55 Β· Closes #337 Β· Built on #339 (review) Β· Verdict: merge, with fixes Β· 5.3.0

The list on the left of Assets was one flat A-Z list, so finding the phones meant searching or scrolling, and how many of each there were was nowhere on the page. Group by type, beside Show retired, draws one heading per asset type - its icon, its name and its count - in the types' own order, then No type. It came on top of #339, so that Intune devices have a type to be grouped by. User page: Assets.

What was checked

Question Result
Off, is the list exactly as it was? Yes - the test checks the list is flat as before with it off
Does anything on the server change? No - presentation only, no endpoint changes. asset-management/table.php and the data-table engine are untouched, as agreed on #337
Search, Show retired, the right-click menu, Ctrl/Shift selection Work within the groups. Shift now selects in the order the rows are on screen
A link to an asset in a closed group? The open asset is always shown, so a link never lands on a hidden row
An empty group? A group nothing was found in is not drawn
An asset whose type is switched off, hidden or another company's? Under No type in the PR; its own heading after the merge - see fix 1

The merge added tests/asset-list-group-by-type.php (headless Chrome, 5 checks), which feeds the real page a made-up list and reads the headings it draws - nothing is written to the database.

What was changed on merge

  1. An asset is grouped by its own type id. The PR looked the type up in the list of types the analyst can pick, so an asset whose type is switched off, hidden or another company's landed under No type. It now gets a heading of its own, named as get_assets.php names it (asset_type_name).
  2. The groups are built in one pass with Maps, instead of includes() / find() for every asset - linear on a large estate.
  3. A test: tests/asset-list-group-by-type.php, headless, 5 checks.
  4. Changelog id renumbered to #2932 (the PR's #2927 had been taken).
  5. Translations of the two new strings into the eight maintained languages; this write-up, the user page and vsc55's entry on the Contributors page.

Decided

  • The list only, not the Table. The Table already groups, filters and sorts by any column, including type; the grouping belongs to the list, which had none (Ed, 2026-11-14).

Worth knowing

  • Remembered in the browser, not the account - assets_group_by_type and the closed groups (assets_type_groups_closed) are in localStorage, like Show retired. Another browser starts ungrouped.
  • No Feature Bingo card: a card's check reads the database, and this choice lives only in the browser.
  • The help (Assets β†’ Help β†’ Tips) describes it in a card that is still English in every language.

FreeITSM

Getting Started

Modules

Multi-tenancy (planned)

Responses to feedback

Blue sky thinking

Bugs resolved

Pull requests

Links

Clone this wiki locally