Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-129055

"flatten" query parameter does not work for Knowledge Base articles API

    Details

      Description

      Solution/Important Notes

      The fix requires to reindex KBArticle entity from the Search admin.


      Reproduction Steps

      1. Navigate to Site Administration > Content & Data > Knowledge Base
      2. Create a folder called "Folder A"
      3. Inside "Folder A," create a Knowledge Base article called "articleA"
      4. Inside "Folder A," create a sub-folder called "Folder B"
      5. Inside "Folder B", create a Knowledge Base article called "articleB"
        root
          │
          └─►Folder A
                │
                ├─────►articleA
                │
                └─────►Folder B
                           │
                           └────►articleB
      6. Run the following command inside a terminal and substitute {folderId} for the ID of "Folder A":
        curl http://localhost:8080/o/headless-delivery/v1.0/knowledge-base-folders/{folderId}/knowledge-base-articles?flatten=true -u 'test@liferay.com:test'
        

      Expected Result:
      The "flatten" parameter returns two Knowledge Base articles, one from "Folder A" and one from "Folder B"
      Actual Result:
      Only a single Knowledge Base article from "Folder A" is returned


      Additional Steps

      1. From Step 6, move "Folder B" to the root directory and rerun the above query using Folder A's folderId
        root
         │
         ├─►Folder A
         │     │
         │     └─────►articleA
         │
         └─►Folder B
         │
         └─────►articleB
        

      Expected Result:
      Only "articleA" is returned

      1. From Step 6, move "articleB" to the root directory and rerun the above query using Folder B's folderId
        root
         │
         ├─►Folder A
         │     │
         │     ├─────►articleA
         │     │
         │     └─────►Folder B
         │
         └─►articleB
        

      Expected Result
      No articles are returned

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-qa Support QA
              Reporter:
              jesse.yeh Jesse Yeh
              Participants of an Issue:
              Recent user:
              Clarissa Velazquez
              Engineering Assignee:
              Christopher Kian
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                13 weeks, 2 days ago

                  Packages

                  Version Package
                  7.2.10 DXP FP13
                  7.2.X
                  7.3.X
                  7.4.0 CE GA1
                  Master