You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 9, 2021. It is now read-only.
When PSO-toolkit's findParentIds method is used by setting the usePublic filter true for parent items ids, the expected behavior is to return all parent item's ids which are all in Public state. However it appears that the usePublic param is ignored in which case both public and archived item's ids are returned by this item which is an unexpected behavior.
Steps to reproduce:
In workbench one of the EI templates use following method by using a specific content id and slot:
$user.psoRelationships.findParentIds($contentid,'SUnitSlot',true)
Update code accordingly to find the returned parentIds and notice that parent items in archived state is also returned by this method.
Engineering comment:
I looked in the code and on debug I found that the results obtained from the database contain parent items that are public and archived both. This seems to be working this way from history. Now the query prepared to get these results can be modified to fetch only the public revisions, but I am not sure how many places in the code base and how many customers will get impacted by this change. A better approach would be to suggest the customer to use some method from PSOToolkit which does another layer of filter and fetches only the public items in the returned results.
When PSO-toolkit's findParentIds method is used by setting the usePublic filter true for parent items ids, the expected behavior is to return all parent item's ids which are all in Public state. However it appears that the usePublic param is ignored in which case both public and archived item's ids are returned by this item which is an unexpected behavior.
Steps to reproduce:
$user.psoRelationships.findParentIds($contentid,'SUnitSlot',true)
Engineering comment:
I looked in the code and on debug I found that the results obtained from the database contain parent items that are public and archived both. This seems to be working this way from history. Now the query prepared to get these results can be modified to fetch only the public revisions, but I am not sure how many places in the code base and how many customers will get impacted by this change. A better approach would be to suggest the customer to use some method from PSOToolkit which does another layer of filter and fetches only the public items in the returned results.