This issue is consequence of work made in Asset Publisher Hook which extends Asset Publisher portlet with possibility of selecting multiple communities as source of assets. Unfortunately it works only with Categories to make possible. Defined in AssetEntryQuery tags always concerns scopeGroupId.
      It has following consequence:
      1. Selecting tags in asset publisher configuration disables Asset Publisher Hook functionality.
      2. It is possible to change AssetPublisherUtil implementation to partially support multiple communities by adding all tag ids from all communities, but:

      • allTagsIds in AssetEntryQuery won't work because tags can originate from different communities and such condition never comes true on single AssetEntry
      • allCategoryIds - similar to allTagsIds

      I think that AssetEntryQuery should be changed and there should be available API which enables to specify allTagsIds and allCategoriesIds for given groupId and there should be possibility to specify more than one such criterion.
      Every criterion pair <groupId, allTagsIds> or <groupId, allCategoriesId> should be considered as alternative.

      For example:
      Lets consider we have 2 or more assets in different communities. In Asset Publisher configuration (modified by Asset Publisher Hook) we select these communities and then we select tags named "test1" and "test2". These AssetTags exists in every community and have different ids. Let assume:

      test1 id=1000
      test2 id=1001

      test1 id=2000
      test2 id=2001

      Now we define query which says give all assets from community1 and community2 which have tags "test1" and "test2".
      In AssetPublisherUtil we get 4 instances for tags named "test1" and "test2".

      Now we can set then in AssetEntryQuery.setAllTagIds but it won't work because there doesn't exist asset entry with AssetTags from community1 and community2.

      If AssetEntryQuery will change to something like this:
      AssetEntryQuery.addAllTagsIds(long groupid, long[] allTagIds);
      then we will be able to define 2 alternative criterion for AssetEntry. In every allTagIds criterion we simply group all tag ids from single community.




            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created:
                Days since last comment:
                7 years, 6 weeks ago


                Version Package