PRESIDECMS-3323 inherited rule handler component metadata is ignored - #1814
Open
choontat-pixl8 wants to merge 6 commits into
Conversation
…component_metadata_is_ignored'.
…do not want to modify the cached metadata in the new changes
| , textHandlerArgs = {} | ||
| }; | ||
|
|
||
| } else if ( func.name == "prepareFilters" ) { |
Contributor
There was a problem hiding this comment.
Was it your intention to remove prepareFilters completely?
Contributor
Author
There was a problem hiding this comment.
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" : ""
...
};
| testbox | ||
| testresults*.html | ||
| .cfconfig.json | ||
| server-presidetests.json |
Contributor
There was a problem hiding this comment.
Not a biggy but I don't think this should be in this ticket.
Contributor
Author
There was a problem hiding this comment.
This line is now removed alongside with the server-presidetests.json file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Get the extended component metadata, including
@expressionContexts)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