Skip to content

PRESIDECMS-3323 inherited rule handler component metadata is ignored - #1814

Open
choontat-pixl8 wants to merge 6 commits into
pixl8:stablefrom
choontat-pixl8:feature-PRESIDECMS-3323_inherited_rule_handler_component_metadata_is_ignored
Open

PRESIDECMS-3323 inherited rule handler component metadata is ignored#1814
choontat-pixl8 wants to merge 6 commits into
pixl8:stablefrom
choontat-pixl8:feature-PRESIDECMS-3323_inherited_rule_handler_component_metadata_is_ignored

Conversation

@choontat-pixl8

@choontat-pixl8 choontat-pixl8 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Get the extended component metadata, including

  • component properties (e.g. @expressionContexts)
  • functions, function parameters (e.g. required string type) and their properties (e.g. @type.fieldType)

Also updates the expression test service to pass Duplicate( meta.functions[1] ) to match the new changes

, textHandlerArgs = {}
};

} else if ( func.name == "prepareFilters" ) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it your intention to remove prepareFilters completely?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original prepareFilters check is to ensure that the filterObjects function property is set in the expression after the evaluateExpression function is processed.

The current _getExtendedFunctionsMeta function returns a struct of function meta, for example

{
      prepareFilters     = { objects="user,contact", parameters=[] }
    , evaluateExpression = { parameters=[] }
}

So we can now do

var filterObjects = ListToArray( functions.prepareFilters.objects ?: "" );
...
expressions[ baseId ] = {
      filterObjects = filterObjects
    , filterHandler = filterObjects.len() ? "rules.expressions.#baseId#.prepareFilters" : ""
    ...
};

Comment thread tests/.gitignore Outdated
testbox
testresults*.html
.cfconfig.json
server-presidetests.json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a biggy but I don't think this should be in this ticket.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is now removed alongside with the server-presidetests.json file

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants