Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-17537

getRatings start and count argument not taken into account in SeparatePageRatingsManager

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.4-milestone-3
    • Fix Version/s: 11.10.6, 12.6
    • Component/s: Ratings
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      RatingsManager provide the an API getRatings to retrieve ratings with the following signature:

      /**
           * Gets a list of ratings
           * 
           * @param documentRef the document to which the ratings belong to
           * @param start the offset from where to fetch the ratings
           * @param count how many ratings to fetch
           * @param asc sort the results in ascending order or not
           * @return a list of Rating objects
           * @throws RatingsException when an error occurs while fetching the list of ratings
           */
          List<Rating> getRatings(DocumentReference documentRef, int start, int count, boolean asc) throws RatingsException;
      

      apparently the start and count argument are never (and have never been) taken into account in the SeparatePageRatingsManager: it means it always send back all the ratings.

        Attachments

          Activity

            People

            • Assignee:
              surli Simon Urli
              Reporter:
              surli Simon Urli
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: