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

Asset Tag Selector search container ignores passed groupIds attribute

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 7.2.0 GA1
    • Fix Version/s: None
    • Component/s: ~[Archived] UI Taglibs
    • Labels:
      None

      Description

      In AssetTagsSelectorDisplayContext class it is possible to specify groupIds array, which is used for filtering tags when they are retrieved from database. 

      However, there is inconsistency how this parameter is passed to individual methods.

      For retrieving tags the correct array is used:

      List<AssetTag> tags = AssetTagServiceUtil.getTags(
           _getGroupIds(), _getKeywords(), tagsSearchContainer.getStart(),
           tagsSearchContainer.getEnd(),
           tagsSearchContainer.getOrderByComparator());

      However, for retrieving the tags count that specified array is ignored completely and default value is passed:

      int tagsCount = AssetTagServiceUtil.getTagsCount(themeDisplay.getScopeGroupId(), _getKeywords());

      It means the search container pagination is completely broken in this case.

      Looking into AssetTagServiceImpl methods it is clear there is missing something like

      public int getTagsCount(long[] groupIds, String name){{ }}

      (accepting array instead of single groupId) which could ensure both tagsCount and tags.size() match.

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            honyk Jan Tošovský
            Participants of an Issue:
            Recent user:
            Jan Tošovský
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              1 year, 25 weeks, 6 days ago

                Packages

                Version Package