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.
Describe the bug
Two parallel, differently-shaped client-side status guards now coexist in
customActions:appliesTo(transitionfrom:) compares as strings,isAvailable(#7068 create-from guard) converts toNumberand returns true onNumber.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.statusPropertytakes the FIRSTfunction: EntityStatusrelation whileGlueIntentGeneratorkeeps the LAST - divergent on an entity declaring two - and the file's doc comment still describes agetActions(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.