EM Assets picker: assets listed under the "Approved" filter are refused on insert when dam:activationTarget ≠ delivery (Author + DM mode)

Open Beginner friendly
#1,394 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
frontend

Research direction

Start with blocks/shared/aem-assets/filter-schema.js and blocks/edit/da-assets/helpers/config.js to understand the locked Approved filter, then compare it with the insert check in blocks/edit/da-assets/da-assets.js. Reproduce the Author + Dynamic Media flow with dam:activationTarget set to no or contenthub. Done means the picker and insert check accept the same assets, including one whose delivery metadata request returns 200.

Written by the indexing model from the issue text.

Description

customer-feedback ew

Summary
In Author + Dynamic Media mode, the picker lists every approved asset, but the insert check then refuses some of them with "not approved for delivery". The listing and the insert apply different rules.

Setup

aem.repositoryId = author-…
aem.asset.dm.delivery = on

Current behaviour

The listing uses a locked filter, "Asset Status: Approved". It covers dam:assetStatus only (filter-schema.js#L20-L37, switched by aem.asset.dm.approvedonly in config.js#L102-L106).
On select, the insert check refuses any asset whose dam:activationTarget is set to something other than delivery (da-assets.js#L127-L135).
This includes dam:activationTarget = no. That value isn't in the documented delivery/contenthub set, but DM delivers those assets (HTTP 200).

Expected
The listing and the insert check apply the same rule, and that rule matches what DM delivers.

Repro

Configure a site in Author + Dynamic Media mode.
In AEM, approve an asset and set dam:activationTarget to no (or contenthub).
Open the picker. The asset is listed.
Select it. The error panel opens.
GET https://delivery--.adobeaemcloud.com/adobe/assets//metadata returns 200 for the no asset.

Proposed fix
Add dam:activationTarget to the locked listing filter, the same way as dam:assetStatus.

Dominant language
JavaScript
Stars
36
Forks
74
Avg merge
2d 20h
Merged PRs (30d)
52

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from adobe/da-live

All issues in adobe/da-live

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.