<!-- 
RSS generated by JIRA (9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b) at Sun Feb 11 23:58:31 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Magnolia - Issue tracker</title>
    <link>https://jira.magnolia-cms.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-uk</language>    <build-info>
        <version>9.4.2</version>
        <build-number>940002</build-number>
        <build-date>19-01-2023</build-date>
    </build-info>


<item>
            <title>[CELUM-45] Download of CELUM Assets via Assets app completes, but all files are broken</title>
                <link>https://jira.magnolia-cms.com/browse/CELUM-45</link>
                <project id="17110" key="CELUM">Celum DAM Connector </project>
                    <description>&lt;p&gt;The CELUM Assets app has the Download action.&lt;/p&gt;

&lt;p&gt;Files seem to download fine.&lt;br/&gt;
However, when trying to open the files, they are corrupted and cannot be opened.&lt;/p&gt;

&lt;p&gt;This is true for any asset. They are definitely NOT broken in the DAM, something is going wrong in the download process. Maybe a wrong url is used for downloading?&lt;/p&gt;

&lt;p&gt;Log shows no errors.&lt;/p&gt;</description>
                <environment></environment>
        <key id="113327">CELUM-45</key>
            <summary>Download of CELUM Assets via Assets app completes, but all files are broken</summary>
                <type id="1" iconUrl="https://jira.magnolia-cms.com/secure/viewavatar?size=xsmall&amp;avatarId=10883&amp;avatarType=issuetype">Bug</type>
                                            <priority id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/priorities/neutral.gif">Neutral</priority>
                        <status id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="2">Won&apos;t Fix</resolution>
                                        <assignee username="rfalvo">Raphael Falvo</assignee>
                                    <reporter username="cchard">Christopher Chard</reporter>
                        <labels>
                    </labels>
                <created>Wed, 8 Jun 2022 16:16:21 +0200</created>
                <updated>Wed, 19 Oct 2022 13:32:27 +0200</updated>
                            <resolved>Wed, 19 Oct 2022 13:32:27 +0200</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="310905" author="JIRAUSER22286" created="Fri, 10 Jun 2022 08:41:50 +0200"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.magnolia-cms.com/secure/ViewProfile.jspa?name=cchard&quot; class=&quot;user-hover&quot; rel=&quot;cchard&quot;&gt;cchard&lt;/a&gt; ,&lt;/p&gt;

&lt;p&gt;For assets that do not have a public URL it&apos;s working fine on my side.&lt;/p&gt;

&lt;p&gt;May you please share the file that is downloaded, as well as the public URL of the related asset ? Thanks&lt;/p&gt;</comment>
                            <comment id="311065" author="cchard" created="Mon, 13 Jun 2022 11:07:40 +0200"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.magnolia-cms.com/secure/ViewProfile.jspa?name=rfalvo&quot; class=&quot;user-hover&quot; rel=&quot;rfalvo&quot;&gt;rfalvo&lt;/a&gt;,&lt;br/&gt;
I tried uploading a sample file, &lt;span class=&quot;error&quot;&gt;&amp;#91;^unigarant__bric_(2018)_uip.pdf&amp;#93;&lt;/span&gt;, but I get an error:&lt;br/&gt;
 &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;96285_thumb&quot; href=&quot;https://jira.magnolia-cms.com/secure/attachment/96285/96285_screenshot-1.png&quot; title=&quot;screenshot-1.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;96285&quot; file-preview-title=&quot;screenshot-1.png&quot;&gt;&lt;img src=&quot;https://jira.magnolia-cms.com/secure/thumbnail/96285/_thumb_96285.png&quot; style=&quot;border: 0px solid black&quot; role=&quot;presentation&quot;/&gt;&lt;/a&gt;&lt;/span&gt; &lt;/p&gt;

&lt;p&gt;The downloaded files are 0 KB:&lt;br/&gt;
 &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;96286_thumb&quot; href=&quot;https://jira.magnolia-cms.com/secure/attachment/96286/96286_screenshot-2.png&quot; title=&quot;screenshot-2.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;96286&quot; file-preview-title=&quot;screenshot-2.png&quot;&gt;&lt;img src=&quot;https://jira.magnolia-cms.com/secure/thumbnail/96286/_thumb_96286.png&quot; style=&quot;border: 0px solid black&quot; role=&quot;presentation&quot;/&gt;&lt;/a&gt;&lt;/span&gt; &lt;/p&gt;

&lt;p&gt;Obviously, in Celum they are NOT 0 KB. I suppose there is some kind of mismatch of where the Download-Action tries to take the file from...&lt;/p&gt;</comment>
                            <comment id="311146" author="JIRAUSER22286" created="Mon, 13 Jun 2022 15:53:36 +0200"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.magnolia-cms.com/secure/ViewProfile.jspa?name=cchard&quot; class=&quot;user-hover&quot; rel=&quot;cchard&quot;&gt;cchard&lt;/a&gt; ,&lt;/p&gt;

&lt;p&gt;Can you share the public URL(s) of these assets ? The system is using the public URLs to download the assets, I want to ensure there is nothing wrong on those. Thanks&lt;/p&gt;</comment>
                            <comment id="312977" author="JIRAUSER22286" created="Tue, 28 Jun 2022 11:05:42 +0200"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.magnolia-cms.com/secure/ViewProfile.jspa?name=cchard&quot; class=&quot;user-hover&quot; rel=&quot;cchard&quot;&gt;cchard&lt;/a&gt; ,&lt;/p&gt;

&lt;p&gt;I have been able to test on our side the download with an asset having a public URL, without being able to reproduce your issue.&lt;/p&gt;

&lt;p&gt;I would suggest you to check if the public URL of the asset on which you are encountering the issue is not broken, or maybe checking if you don&apos;t have custom code for the download action (original action is info.magnolia.dam.app.action.DownloadAssetAction)&lt;/p&gt;</comment>
                            <comment id="313445" author="JIRAUSER22286" created="Fri, 1 Jul 2022 12:04:53 +0200"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.magnolia-cms.com/secure/ViewProfile.jspa?name=cchard&quot; class=&quot;user-hover&quot; rel=&quot;cchard&quot;&gt;cchard&lt;/a&gt; ,&lt;/p&gt;

&lt;p&gt;Can you please provide here all the custom code you have which relates to public URL ? Thanks&lt;/p&gt;</comment>
                            <comment id="313713" author="cchard" created="Tue, 5 Jul 2022 09:26:13 +0200"  >&lt;p&gt;Here you go, this is our entire custom code:&lt;/p&gt;

&lt;p&gt;ui-module-celum/src/main/java/com/ui/celum/CelumConstants.java&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;package&lt;/span&gt; com.ui.celum;

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;CelumConstants {
	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; CELUM_EXPORTER_PROVIDER = &lt;span class=&quot;code-quote&quot;&gt;&quot;celum-extension-exporter&quot;&lt;/span&gt;;
	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; CELUM_EXPORTER_INSTANCE = &quot;&quot;;
	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; CELUM_DEFAULT_ASSET = &lt;span class=&quot;code-quote&quot;&gt;&quot;original&quot;&lt;/span&gt;;
	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;Integer&lt;/span&gt; CELUM_FIELD_RELEVANT_FOR_CMS = 482;
	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;Integer&lt;/span&gt; CELUM_ASSET_TYPE_CMS = 10011;
}

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;ui-module-celum/src/main/java/com/ui/celum/service/UiCelumServiceImpl.java&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;package&lt;/span&gt; com.ui.celum.service;

&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; com.ui.celum.CelumConstants.CELUM_ASSET_TYPE_CMS;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; com.ui.celum.CelumConstants.CELUM_DEFAULT_ASSET;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; com.ui.celum.CelumConstants.CELUM_EXPORTER_INSTANCE;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; com.ui.celum.CelumConstants.CELUM_EXPORTER_PROVIDER;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; com.ui.celum.CelumConstants.CELUM_FIELD_RELEVANT_FOR_CMS;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; java.lang.&lt;span class=&quot;code-object&quot;&gt;Long&lt;/span&gt;.parseLong;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; java.util.Collections.EMPTY_LIST;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; java.util.Collections.singleton;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; java.util.Collections.singletonList;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; java.util.Comparator.comparing;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; java.util.stream.Collectors.toList;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; java.util.stream.StreamSupport.stream;

&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; java.util.Collection;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; java.util.Objects;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; java.util.stream.Stream;

&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; javax.inject.Inject;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; javax.inject.Provider;

&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; org.apache.commons.lang3.StringUtils;

&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.celum.api.identifiers.AssetId;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.celum.api.identifiers.AssetTypeId;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.celum.api.identifiers.InformationFieldId;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.celum.api.identifiers.NodeId;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.celum.api.model.AssetPublicUrl;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.celum.api.model.Node;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.celum.api.model.ProviderFilter;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.celum.api.queries.AssetPublicUrlsQuery;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.celum.api.queries.AssetSearchQuery;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.celum.api.queries.ChildNodesQuery;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.celum.api.queries.filters.AssetFilter;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.celum.api.queries.filters.AssetFilters;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.celum.api.remote.RemoteClient;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.celum.api.serialization.filters.AssetFiltersImpl;

&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; info.magnolia.addon.commons.cache.annotation.Cacheable;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; info.magnolia.dam.api.Item;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; info.magnolia.external.dam.celum.CelumAsset;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; info.magnolia.external.dam.celum.CelumAssetProvider;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; info.magnolia.external.dam.celum.CelumCredentialProvider;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; info.magnolia.external.dam.celum.CelumFolder;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; info.magnolia.external.dam.celum.DamCelumModule;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; info.magnolia.external.dam.celum.connection.CelumConnectionManager;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; info.magnolia.external.dam.celum.filters.AssetsSearchFilterFactory;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; info.magnolia.external.dam.celum.service.CelumJcrService;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; info.magnolia.external.dam.celum.service.CelumServiceImpl;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; info.magnolia.external.dam.celum.util.CelumUtil;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; lombok.extern.slf4j.Slf4j;

@Slf4j
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;UiCelumServiceImpl &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; CelumServiceImpl {
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; DamCelumModule module;
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; Provider&amp;lt;CelumAssetProvider&amp;gt; celumAssetProvider;
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; CelumConnectionManager celumConnectionManager;
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; CelumJcrService celumJcrService;

	@Inject
	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; UiCelumServiceImpl(
			&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; Provider&amp;lt;DamCelumModule&amp;gt; module,
			&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; Provider&amp;lt;CelumAssetProvider&amp;gt; celumAssetProvider,
			&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; CelumCredentialProvider credentialProvider,
			&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; CelumConnectionManager celumConnectionManager,
			&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; AssetsSearchFilterFactory searchFilterFactory,
			&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; CelumJcrService celumJcrService) {
		&lt;span class=&quot;code-keyword&quot;&gt;super&lt;/span&gt;(
				module,
				celumAssetProvider,
				credentialProvider,
				celumConnectionManager,
				searchFilterFactory,
				celumJcrService);
		&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.module = module.get();
		&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.celumAssetProvider = celumAssetProvider;
		&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.celumConnectionManager = celumConnectionManager;
		&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.celumJcrService = celumJcrService;
	}

	RemoteClient client() {
		&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.celumConnectionManager.getClientConnection();
	}

	@Override
	@Cacheable(cacheName = { &lt;span class=&quot;code-quote&quot;&gt;&quot;celum-assets-in-folder&quot;&lt;/span&gt; })
	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; Collection&amp;lt;Item&amp;gt; getAssetsInFolder(&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; id, &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; userId) {
		&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; NodeId nodeId = CelumUtil.getNodeId(id);

		&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.client() == &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; || nodeId.getId() &amp;lt; 1L) {
			&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; EMPTY_LIST;
		}

		&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; Stream.concat(
				fetchChildFolders(nodeId),
				fetchChildAssets(nodeId))
				.collect(toList());

	}

	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; Stream&amp;lt;Item&amp;gt; fetchChildFolders(&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; NodeId nodeId) {
		&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; ChildNodesQuery childNodesQuery = ChildNodesQuery
				.byUser(&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.getCredentials())
				.fromParentNode(nodeId)
				.build();

		&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; stream(&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.client().repository().query(childNodesQuery).spliterator(), &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
				.filter(Objects::nonNull)
				.map(&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;::toCelumFolder)
				.map(folder -&amp;gt; (Item) folder)
				.sorted(comparing(Item::getName));
	}

	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; CelumFolder toCelumFolder(&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; Node node) {
		&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; CelumFolder(&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.celumAssetProvider.get(), node, &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;, &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.module.getDefaultLocale());
	}

	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; Stream&amp;lt;Item&amp;gt; fetchChildAssets(&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; NodeId nodeId) {
		&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; AssetFilters assetFilters = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; AssetFiltersImpl();
		&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; AssetFilter onlyAvailableAssetsWithinCurrentFolder = assetFilters.and(
				assetFilters.assetsByNode(nodeId),
				assetFilters.assetsByAvailability().available(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;));

		&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; AssetFilter onlyCmsAssets = assetFilters.or(
				assetFilters.assetsByBooleanField(InformationFieldId.of(CELUM_FIELD_RELEVANT_FOR_CMS))
						.withValue(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;),
				assetFilters.assetsByAssetType(AssetTypeId.of(CELUM_ASSET_TYPE_CMS)));

		&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; AssetSearchQuery assetsSearchQuery = AssetSearchQuery
				.byUser(&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.getCredentials())
				.withFilter(assetFilters.and(onlyAvailableAssetsWithinCurrentFolder, onlyCmsAssets))
				.build();

		&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; stream(&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.client().repository().query(assetsSearchQuery).spliterator(), &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
				.filter(Objects::nonNull)
				.map(asset -&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; CelumAsset(&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.celumAssetProvider.get(), asset, nodeId.toString()))
				.map(asset -&amp;gt; (Item) asset)
				.sorted(comparing(Item::getName));

	}

	@Override
	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; getPublicUrlQuery(&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; id, &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; rendition) {
		&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.celumJcrService
				.getPublicUrlFromJcr(rendition, id)
				.orElseGet(() -&amp;gt; fetchPublicUrlAndSaveToJcr(id, rendition));
	}

	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; fetchPublicUrlAndSaveToJcr(&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; id, &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; rendition) {
		&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; AssetPublicUrlsQuery assetPublicUrlsQuery = AssetPublicUrlsQuery
				.byUser(&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.getCredentials())
				.forAssets(singleton(AssetId.of(parseLong(id))))
				.forProvider(singletonList(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ProviderFilter(CELUM_EXPORTER_PROVIDER, CELUM_EXPORTER_INSTANCE)))
				.withDescription(CELUM_DEFAULT_ASSET)
				.build();

		&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; stream(&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.client()
				.repository()
				.query(assetPublicUrlsQuery)
				.spliterator(), &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
						.findFirst()
						.map(&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;::writePublicUrlToJcr)
						.map(AssetPublicUrl::getUrl)
						.orElse(StringUtils.EMPTY);
	}

	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; AssetPublicUrl writePublicUrlToJcr(&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; AssetPublicUrl publicUrl) {
		&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.celumJcrService.savePublicUrlToJcr(
				publicUrl.getUrl(),
				publicUrl.getDescription(),
				publicUrl.getAssetId().toString());
		&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; publicUrl;
	}
}

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="327238" author="JIRAUSER22286" created="Wed, 19 Oct 2022 13:32:27 +0200"  >&lt;p&gt;Closing the issue as not reproducible within a fresh Magnolia instance.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="96285" name="screenshot-1.png" size="9910" author="cchard" created="Mon, 13 Jun 2022 10:34:57 +0200"/>
                            <attachment id="96286" name="screenshot-2.png" size="5639" author="cchard" created="Mon, 13 Jun 2022 10:35:25 +0200"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_14166" key="com.okapya.jira.checklist:checklist">
                        <customfieldname>Acceptance criteria</customfieldname>
                        <customfieldvalues>
                            
        <checklist>
        <![CDATA[
                            




                
                                    <div class="o-completion" style="display: flex; flex-shrink: 0;"><span  class="aui-lozenge aui-lozenge-complete" style="font-size: 12px; font-weight: normal; display: flex; flex-direction: row; align-items: center;" ><span style="padding-right: 4px; vertical-align: middle;"><svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg" fill="white"><path clip-rule="evenodd" d="m10.41037,3.42544l-7.86501,0c-0.72395,0 -1.31084,0.58688 -1.31084,1.31084l0,7.86508c0,0.7239 0.58689,1.3108 1.31084,1.3108l7.86501,0c0.724,0 1.3109,-0.5869 1.3109,-1.3108l0,-7.86508c0,-0.72396 -0.5869,-1.31084 -1.3109,-1.31084zm-7.86501,-0.65542c-1.08593,0 -1.96626,0.88032 -1.96626,1.96626l0,7.86508c0,1.0859 0.88033,1.9662 1.96626,1.9662l7.86501,0c1.086,0 1.9663,-0.8803 1.9663,-1.9662l0,-7.86508c0,-1.08594 -0.8803,-1.96626 -1.9663,-1.96626l-7.86501,0z" fill-rule="evenodd"/><path d="m5.09049,10.18526l-1.82767,-1.82766l-0.78479,0.78479l2.61246,2.61246l5.38758,-5.38754l-0.78483,-0.78479l-4.60275,4.60274z"/></svg></span><span>Empty</span></span></div>
                        ]]>
    </checklist>


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10111" key="com.atlassian.jira.toolkit:reporterdomain">
                        <customfieldname>Company</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>union-investment.de</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10031" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 10 Jun 2022 08:41:50 +0200</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_12730" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14151" key="com.atlassian.jira.toolkit:message">
                        <customfieldname>Docu info</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10061" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comm is not jira-dev</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10071" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last participant</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>rfalvo</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_13136" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 16 weeks, 4 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10020" key="com.atlassian.jira.toolkit:attachments">
                        <customfieldname>Number of attachments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10150" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname>Number of comments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>cchard</customfieldvalue>
            <customfieldvalue>rfalvo</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10833" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|y06y0a:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10244" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_14145" key="com.intenso.jira.issue-templates:issue-templates-customfield">
                        <customfieldname>Template</customfieldname>
                        <customfieldvalues>
                            


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15131" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Time in Discovery</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_13933" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Urgency (resolution)</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="15724"><![CDATA[Normal]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>