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

Incorrect results when calling DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcuts

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 7.1.X, 7.2.X, Master
    • Fix Version/s: None
    • Component/s: Workflow > API
    • Labels:
    • Fix Priority:
      3

      Description

      Steps to reproduce:

      1. Log in as Admin
      2. Go to Documents & Media
      3. Click the Ellipsis menu in the upper right corner and select "Edit"
      4. Set Single Approver workflow for home folder
      5. Create one folder in home folder
      6. Upload 3 documents in home folder
      7. Go to My Workflow Tasks and approve 2 of the documents
      8. Run the following Groovy script (for status value put first 0 for Approved and then 1 for Pending):

       

      import com.liferay.document.library.kernel.service.DLAppServiceUtil
      println(DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcuts(repositoryId, folderId, status, includeMountFolders, start, end, obc))
      

       

      Actual behavior: If you put 0 as status, the script returns all 3 files and the 1 folder, regardless of their statuses. If you put 1 as status, the script returns all 3 files but not the folder.
      Expected behavior: It should return only files and folders with the specified status only (Pending OR Approved)
      The workflow is not applied to folder, so I am not sure how folders count, but it is also strange that it appears in one of the results and not the other. Please clarify this.

      Also tested on:
      7.1.x @b820b3660c5815e82aec0777185a5d7fa8c15ea2 -> Same issue
      Master @c51722ab06cf42a893c9c17064383593aaad7abe -> Same issue

        Attachments

          Activity

            People

            • Assignee:
              marcell.gyopos Marcell Gyöpös
              Reporter:
              marcell.gyopos Marcell Gyöpös
              Participants of an Issue:
              Recent user:
              Brian Wulbern
              Engineering Assignee:
              Marcell Gyöpös
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                36 weeks, 6 days ago

                Packages

                Version Package