Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata card not displaying custom group in the Recent Files navigation. It displays properly in "My Libraries" navigation #923

Closed
nvmadhav opened this issue Feb 8, 2019 · 19 comments
Labels
Milestone

Comments

@nvmadhav
Copy link

nvmadhav commented Feb 8, 2019

Describe the bug
We have defined the custom preset in the app.extensions.json like below

"content-metadata-presets": [
      {
        "id": "app.content.metadata.custom",
        "custom": [
          {
            "id": "app.content.metadata.customGroup",
            "title": "Test",
            "items": [

              {
                "id": "app.content.metadata.testAspect",
                "aspect": "test:TestDocument",
                "properties": [
                  "test:documentType",
                  "test:access",
                  "test:eligibility"
                ]
              }
            ]
          }
        ]
      }
    ]

Then the custom properties is getting displayed when we navigate to "My Libraries" and click on "i" icon.

But when we navigate to recent files and click on "i" icon, the custom group is not displayed in the side panel.
To Reproduce
Steps to reproduce the behavior:

  1. Go to Recent Files Navigation
  2. Select the document
  3. Click on "i" icon on top right corner.
  4. You don't see customized metadata group.

Expected behavior
It should display the configured custom metadata.

Screenshots
If applicable, add screenshots to help explain your problem.

@john-knowles
Copy link
Contributor

@nvmadhav - thank you for the feedback; we've created a ticket in our backlog for this - https://issues.alfresco.com/jira/browse/ACA-2194

@DenysVuika
Copy link
Contributor

DenysVuika commented Feb 13, 2019

@nvmadhav not sure if that helps but with the ACA 1.7 (development) and ACS Community 6.1.2.0 I am able to see custom aspect everywhere. Note that versions are just what I am using right now, not the minimal requirement for this feature.

I've created a custom model and aspect called aca:denys having an aca:name property inside.
Then associated aspect with a file in Share, and declared the following preset

"content-metadata-presets": [
      {
        "id": "app.content.metadata.custom",
        "custom": [
          {
            "id": "custom.aspect.demo",
            "title": "aca:denys",
            "items": [
              {
                "id": "aca:denys",
                "aspect": "aca:denys",
                "properties": "*"
              }
            ]
          }
        ]
      }

At runtime, in all the places where metadata is displayed, I can see it:

screenshot 2019-02-13 at 14 21 29

@nvmadhav
Copy link
Author

@DenysVuika Is this in "Recent Files" navigation view or the regular view? I was able to see in other views except "Recent Files" view.

@DenysVuika
Copy link
Contributor

Recent Files is Search API query: source code

@nvmadhav
Copy link
Author

ya. Sorry looks like I was not clear. When I go to "Recent Files" and select a document, then click on "i" (information) icon then it was not showing the custom metadata view. But when I go to libraries and browse to a document and select that document and click on "i" then I was able to view the custom metadata. Not sure why as the component is same in both places. I have not tested with latest from development. I will test with development branch and will inform you.

@DenysVuika
Copy link
Contributor

The screenshot I made was for the "Recent Files", I have also tested with Files Component that backs Personal Files and Libraries.

@DenysVuika
Copy link
Contributor

Tested with ACS 6.1 -> cannot reproduce
Tested with ACS 5.2.4 -> issue can be reproduced

Closing this issue as 5.2.x APIs do not enable us to support this use case

@nvmadhav
Copy link
Author

@DenysVuika can you please provide more details which component uses the ACS6.1 service and about the service so that we will explore possibility of making it work for 5.2 version

@DenysVuika
Copy link
Contributor

@nvmadhav same component this issue is raised for: Metadata Card from ADF

@nvmadhav
Copy link
Author

@DenysVuika Little bit confused.Metadata component working in Favorites navigation and in the preview page but not working only in the recent files navigation. I need to still understand what ACS6.1 change impacting only recent files.

@DenysVuika
Copy link
Contributor

@nvmadhav just a guess - 6.1 has solr6 and various fixes to Search Services, we use Search API for recent files.

@nvmadhav
Copy link
Author

@DenysVuika We use Solr6 with search services 1.1.1. I know solr6 uses search services 1.2. Will dig into more to understand

@nvmadhav
Copy link
Author

@DenysVuika For me it looks like a bug. When I click on information icon, I didn't even see the calls going to metadata. And also initial call its making to favorites component and its not getting that document. You should be able to replicate this by selecting non-favorited document in Recent files. I will dig into more to see the actual root cause
/alfresco/api/-default-/public/alfresco/versions/1/people/-me-/favorites/8r4117a2-xxxx-4f5f-yyyy-ed919e43ef8e. Ideally as this document is not favorited, it shouldn't call favorites service

@DenysVuika DenysVuika reopened this Feb 27, 2019
@nvmadhav
Copy link
Author

@DenysVuika I think I found the problem Issue is in the content-app
https://github.com/Alfresco/alfresco-content-app/blob/master/src/app/components/info-drawer/info-drawer.component.ts
In the above file please refer the below method.
private isRecentListFileNode(node: MinimalNodeEntity): boolean {
return this.isTypeImage(node.entry) && !this.hasAspectNames(node.entry);
}

Here we are allowing to load the node content only for the images. Ideally we should load the node info for all the documents. Not sure what exactly the purpose of having this condition. Also in case of Shared node, we are supposed to pass "entry.id" instead of "entry.nodeId". Can you please explain why do we have this condition for Recent files. Based on this condition, it should fail with ACS6.1 as well. Bit confused . sorry for multiple threads

@DenysVuika
Copy link
Contributor

I reopened the ticket and will investigate today. Thanks for details.

@DenysVuika
Copy link
Contributor

@nvmadhav Originally, we introduced Metadata prototype in ACA for images only, I think that's a very old block of code that needs to be removed. Good finding!

@DenysVuika DenysVuika added bug and removed acs:5.2.x labels Feb 28, 2019
@DenysVuika DenysVuika added this to the 1.7.0 milestone Feb 28, 2019
@nvmadhav
Copy link
Author

@DenysVuika Thanks for looking into this. Ideally irrespective of the navigation, here we should load the node information. I am not sure why are we loading the node info based on the condition. This is impacting if we write new navigational items. For new navigational items, we have to update this file for metadata component to work properly. Please consider this and provide generic solution here while fixing this.

@jigirshah
Copy link

Hello,

In above example,
let's say if I have defined "test:access" property as true in content model and I would like to display all values in new line or with another separator than Comma, then How to achieve that?
What should be added in app.extensions.json file?
Please help.

Thanks,
Jigir Shah

@DenysVuika
Copy link
Contributor

@jigirshah we use GitHub issue tracker for bugs and feature requests, please use Gitter or Community portal for generic chats and questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants