-
Type:
Bug
-
Status: Open
-
Resolution: Unresolved
-
Affects Version/s: 7.2.0 GA1
-
Fix Version/s: None
-
Component/s: ~[Archived] UI Taglibs
-
Labels:None
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.