Skip to content

ui: the create-from client guard fails open on a non-numeric status and compares differently from the transition guard #7150

Description

@delchev

Describe the bug

Two parallel, differently-shaped client-side status guards now coexist in customActions: appliesTo (transition from:) compares as strings, isAvailable (#7068 create-from guard) converts to Number and returns true on Number.isNaN - so on any model whose status property carries a non-numeric value the create-from guard is inert (fails open) while the server 409s, and the two guards disagree on the same record. Also: GeneratesGuardSupport.statusProperty takes the FIRST function: EntityStatus relation while GlueIntentGenerator keeps the LAST - divergent on an entity declaring two - and the file's doc comment still describes a getActions(perspective, view, type) signature that does not exist.

Expected

One comparison rule for both guards (string comparison, like appliesTo), one rule for which status relation is THE status, and the doc comment matching the code.

Context

#7084 (issue #7073) + #7080 (issue #7068). application-core/.../shell/js/stores/customActions.js (appliesTo/isAvailable ~171), GeneratesGuardSupport, GlueIntentGenerator ~1019.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions