Skip to content

MID-9879 Add inline type support for collection filters#651

Open
kay1313 wants to merge 1 commit into
masterfrom
fix/MID-9879
Open

MID-9879 Add inline type support for collection filters#651
kay1313 wants to merge 1 commit into
masterfrom
fix/MID-9879

Conversation

@kay1313
Copy link
Copy Markdown
Contributor

@kay1313 kay1313 commented May 15, 2026

Summary

Fixed MID-9879: dashboard widgets with inline object collection filters could not be evaluated when no referenced object collection was used.

Previously, this configuration was accepted:

<collection>
    <filter>
        <q:text>activation/effectiveStatus = "enabled"</q:text>
    </filter>
</collection>

but the widget failed at runtime with UndefinedTypeForCollection, because CollectionRefSpecificationType allowed an inline filter but had no way to specify the object type.

This PR adds optional explicit type support to CollectionRefSpecificationType:

<collection>
    <type>UserType</type>
    <filter>
        <q:text>activation/effectiveStatus = "enabled"</q:text>
    </filter>
</collection>

Changes

  • Added optional <type> to CollectionRefSpecificationType in common-gui-3.xsd.
  • Updated CollectionProcessor to use the explicit collection type when parsing inline filters.
  • Added validation for conflicting types:
    • explicit type may provide a missing type,
    • explicit type may narrow a broader containing type,
    • explicit type may not broaden or conflict with the containing type.
  • Added integration tests for inline typed filters, narrowing, and conflicting types.
  • Added release note entry.

Manual verification

Verified manually in GUI:

  • Original dashboard widget with inline filter and no type reproduced the issue: UndefinedTypeForCollection / widget rendered as Unknown.
  • New inline typed collection syntax saves successfully in raw XML.
  • Dashboard widget renders successfully with expected count:
<collection>
    <type>UserType</type>
    <filter>
        <q:text>activation/effectiveStatus = "enabled"</q:text>
    </filter>
</collection>
  • Existing documented collectionRef-based widget configuration was checked and still works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant