Error Message when changed optional field to mandatory for metadata schema. | Community
Skip to main content
Level 3
Apr 30, 2018 5:26 PM UTC
Solved

Error Message when changed optional field to mandatory for metadata schema.

Hi All,

   We have a Asset metadata schema with various fields , Many of them are optional. Now we are trying to make few fields as required, and expectation was it gives an error if any those mandatory fields are is not authored for new assets  . But it is showing a error message (REQUIRED METADATA IS MISSING) for the existing assets. Is there a way to not to display such error for the already existing assets ?

Thanks in Advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
shrotiAccepted solution
Employee
May 1, 2018 4:47 AM UTC

Hi,

Not sure which AEM version you are talking about here, my reply assumes it is for 6.4 (though most of it will be applicable even for previous versions too).

-> expectation was it gives an error if any those mandatory fields are is not authored for new assets  .

For this definition of "new assets" needs to be shape out first, to keep it simple, I am considering assets which are ingested in last 24 hours are new assets.

-> Is there a way to not to display such error for the already existing assets ?

Yes. AFAIK there is no config to achieve this but you can overlay[0], there is a method with name hasValidMetadata at line no. 353. Just update the method and add condition to return true only for assets which are ingested(jcr:created) 24 hour before.

[0]/libs/dam/gui/coral/components/admin/contentrenderer/card/common/card-banner.jsp

12 replies

shrotiAccepted solution
Employee
May 1, 2018 4:47 AM UTC

Hi,

Not sure which AEM version you are talking about here, my reply assumes it is for 6.4 (though most of it will be applicable even for previous versions too).

-> expectation was it gives an error if any those mandatory fields are is not authored for new assets  .

For this definition of "new assets" needs to be shape out first, to keep it simple, I am considering assets which are ingested in last 24 hours are new assets.

-> Is there a way to not to display such error for the already existing assets ?

Yes. AFAIK there is no config to achieve this but you can overlay[0], there is a method with name hasValidMetadata at line no. 353. Just update the method and add condition to return true only for assets which are ingested(jcr:created) 24 hour before.

[0]/libs/dam/gui/coral/components/admin/contentrenderer/card/common/card-banner.jsp

Translate
smacdonald2008
Level 10
Apr 30, 2018 7:36 PM UTC

Can you show us which property you changed.

Translate