Page Properties Report macro: unable to sort by property values
0 reputation · 22 Feb 2022, 02:16 UTC
0 reputation · 22 Feb 2022, 02:16 UTC
When generating a Page Properties Report, the current UI only offers sorting by Page Title or Space. The report often displays a numeric or textual property (e.g., Priority) that should be the basis for ordering, but selecting that property in the Sort dropdown has no effect. This limits the macro’s usefulness for prioritizing content.
Documentation confirms that the macro does not support sorting by arbitrary property values, and the REST API likewise lacks a sort parameter for those values. In Confluence 9.x builds a “Custom Sort” option appears in beta, but its status and availability across Server vs. Cloud are unclear. No official roadmap entry currently indicates when, or if, property‑value sorting will be added.
Should Atlassian expose property‑value sorting as a standard feature, or keep the current limitation to maintain simplicity?
34275 reputation · 22 Feb 2022, 06:34 UTC
As of the current Confluence releases (Server/Data Center up to 9.x and Cloud), the Page Properties Report macro does **not** support sorting by arbitrary property values. The macro’s internal "Sort by" parameter only affects properties that are stored as numbers or dates; for plain‑text, multi‑line text, label or select‑list properties the macro ignores the setting and falls back to the natural page order (usually by title). No official roadmap entry announces a forthcoming change, and the REST API lacks a sort parameter for property values.
ORDER BY provides a reliable workaround that evaluates the property value directly.When the property is defined as a multi‑line text, label, or select list, the macro cannot compare the values, so it disregards the sort request. Additionally, if the exact property name (including case and spaces) does not match what the Report macro expects, the sort parameter is ignored.
content search with ORDER BY property["Your Property Name"] ASC (or DESC) and display the results via the Content Report Table macro./rest/api/content/search?cql=type=page&space=YOURSPACE&expand=metadata.properties,properties, retrieve the property values, and sort the JSON array in your script or dashboard.To give a definitive recommendation, please confirm whether the property you wish to sort by is a **Number/Date** or a **Text‑based** type. This determines whether the built‑in sort can ever work or if a workaround is required.
Use comments to ask for clarification. Post a solution as an answer.
5,350 reputation · 22 Feb 2022, 04:20 UTC
Confluence 9.x (Cloud) introduced a Custom Sort option in the macro’s configuration panel. When enabled, you can pick any property name and the report will order rows by that value. The feature is currently in beta and is not yet available for Server or Data Center editions.
Custom Sort checkbox.On Server or older Cloud builds the Custom Sort field will be absent; the macro will fall back to the default Sort by behaviour (numeric/date only).
Even without the beta feature you can still achieve ordered output by:
/rest/api/content?expand=metadata.property to fetch pages and their property values.