HomePhabricator

Change PropertyColumn key format and use it as column reference when rendering…

Tags
None
Referenced Files
None
Subscribers
None

Description

Change PropertyColumn key format and use it as column reference when rendering the cells

Support for qualifier-columns was originally added in 6a055c2d4704.

That did not include support in the queries endpoint,
especially as the column reference in each cell did
not even include the qualifier.

That was added in 0e4581599. We added the get_title method,
the same as get_key except for the case of properties with
qualifier information, where it renders as P1/Q2/P3 instead
of P1Q2P3 - matching the expected syntax in the configuration
template.

This was a bit of a misconception: the queries endpoint relies
on the column reference in the cell to find back the correct
column object. Each column is indexed with its key.

But the choice in 6a055c2 to build the key by sticking together
as P1Q2P3, instead of joining with slashes "P1/Q2/P3" and thus
matching the configuration template syntax is a bit baffling.
There is no problem with having a key with slashes, so let's use that.

(Indeed, for all the other Column objects,
get_title was a mere alias to get_key).

  • Change PropertyColumn' get_key to join with slashes
  • Change Grouping' format_cell to use get_key instead of get_title
  • Delete get_title (added in 0e458159) as unused
  • Adapt unit tests accordingly

Bug: T353667
Bug: T251008

Details

Provenance
JeanFredAuthored on Feb 11 2024, 4:23 PM
Parents
R2566:992670c0d7ee: Remove statsd integration as not available anymore in WMCS
Branches
Unknown
Tags
Unknown
ChangeId
None