Skip to content
This repository was archived by the owner on Apr 9, 2021. It is now read-only.
This repository was archived by the owner on Apr 9, 2021. It is now read-only.

PSO-toolkit findParentIds returns both public and arhieved items #38

@nsmythili

Description

@nsmythili

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:

  1. In workbench one of the EI templates use following method by using a specific content id and slot:
    $user.psoRelationships.findParentIds($contentid,'SUnitSlot',true)
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions