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

LPS-153687 Add fetchSharingCollaborators to the Info display Context #2636

Closed
wants to merge 7 commits into from

Conversation

cgoncas
Copy link
Collaborator

@cgoncas cgoncas commented Jul 26, 2022

Motivation

As a content marketer, I want to see all my collaborators after sharing an asset, so that I can easily view and manage my collaborators on a specific asset.

Proposed Solution

This solution use the same approach described in #2612.

We have created a sharing_collaborators.jsp that includes the sharing:collaborators taglib, so the sharing collaborators is rendered using a fetch, as we do with the content performance panel.

Also in this PR we have include the new actions for Blogs and FileEntries that create a URL to this new JSP.

How to test it

Until the frontend part is send, no functional tests can be executed.

Integration tests will be sent in another PR.

@liferay-continuous-integration

To conserve resources, the PR Tester does not automatically run for every pull.

If your code changes were already tested in another pull, reference that pull in this pull so the test results can be analyzed.

If your pull was never tested, comment "ci:test" to run the PR Tester for this pull.

@cgoncas
Copy link
Collaborator Author

cgoncas commented Jul 26, 2022

ci:test:sf

@liferay-continuous-integration

❌ ci:test:sf - 0 out of 1 jobs passed in 3 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: e9a5492319dcfab370b8c5ae5cf26b79237f8531

Sender Branch:

Branch Name: LPS-153687.Backend
Branch GIT ID: 737de8d2ab0aade9305282b720b8d03e7fd03bef

0 out of 1jobs PASSED
For more details click here.
     [java] java.lang.Exception: Found 2 formatting issues:
     [java] 1: No need to declare variable 'liferayPortletResponse'. Pass the method call directly as parameter on line '83'.: ./modules/apps/content-dashboard/content-dashboard-blogs-impl/src/main/java/com/liferay/content/dashboard/blogs/internal/item/action/SharingCollaboratorsBlogsEntryContentDashboardItemAction.java 79 (Checkstyle:VariableDeclarationAsUsedCheck)
     [java] 2: No need to call 'portletURL.toString', use 'buildString' instead of 'buildPortletURL', see https://github.com/liferay/liferay-portal/blob/master/modules/util/source-formatter/src/main/resources/documentation/check/builder_check.markdown: ./modules/apps/content-dashboard/content-dashboard-blogs-impl/src/main/java/com/liferay/content/dashboard/blogs/internal/item/action/SharingCollaboratorsBlogsEntryContentDashboardItemAction.java 96 (Checkstyle:PortletURLBuilderCheck)
     [java] 
     [java]   at com.liferay.source.formatter.SourceFormatter.format(SourceFormatter.java:442)
     [java]   at com.liferay.source.formatter.SourceFormatter.main(SourceFormatter.java:284)
[stopwatch] [run.batch.test.action: 58.550 sec]
     [echo] The following error occurred while executing this line:
     [echo] /opt/dev/projects/github/liferay-portal/portal-impl/build.xml:450: The following error occurred while executing this line:
     [echo] /opt/dev/projects/github/liferay-portal/portal-impl/build.xml:593: Java returned: 1
      [get] Getting: http://test-1-35/job/test-portal-source-format/1339//consoleText
      [get] To: /opt/dev/projects/github/liferay-portal/20220726100108295.txt
   [delete] Deleting: /opt/dev/projects/github/liferay-portal/20220726100108295.txt
  [typedef] Could not load definitions from resource org/apache/maven/artifact/ant/antlib.xml. It could not be found.
  [taskdef] Could not load definitions from resource org/jacoco/ant/antlib.xml. It could not be found.
   [delete] Deleting: /opt/dev/projects/github/liferay-portal/null672549779.properties

merge-test-results:
[mkdir] Created dir: /opt/dev/projects/github/liferay-portal/test-results
[beanshell] Truncating errors in /opt/dev/projects/github/liferay-portal/portal-impl/test-results/TEST-JenkinsLogAssertTest.xml
[junitreport] Processing /opt/dev/projects/github/liferay-portal/test-results/TESTS-TestSuites.xml to /tmp/null1814934527

@liferay-continuous-integration

@cgoncas
Copy link
Collaborator Author

cgoncas commented Jul 26, 2022

ci:test:relevant

@cgoncas
Copy link
Collaborator Author

cgoncas commented Jul 26, 2022

ci:test:sf

@liferay-continuous-integration

❌ ci:test:sf - 0 out of 1 jobs passed in 3 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: e9a5492319dcfab370b8c5ae5cf26b79237f8531

Sender Branch:

Branch Name: LPS-153687.Backend
Branch GIT ID: 976f7bd7dfedbeb51a24d61e6cf03cc493fc543a

0 out of 1jobs PASSED
For more details click here.
     [java] java.lang.Exception: Found 6 formatting issues:
     [java] 1: No need to declare variable 'liferayPortletResponse'. Pass the method call directly as parameter on line '83'.: ./modules/apps/content-dashboard/content-dashboard-blogs-impl/src/main/java/com/liferay/content/dashboard/blogs/internal/item/action/SharingCollaboratorsBlogsEntryContentDashboardItemAction.java 79 (Checkstyle:VariableDeclarationAsUsedCheck)
     [java] 2: No need to call 'portletURL.toString', use 'buildString' instead of 'buildPortletURL', see https://github.com/liferay/liferay-portal/blob/master/modules/util/source-formatter/src/main/resources/documentation/check/builder_check.markdown: ./modules/apps/content-dashboard/content-dashboard-blogs-impl/src/main/java/com/liferay/content/dashboard/blogs/internal/item/action/SharingCollaboratorsBlogsEntryContentDashboardItemAction.java 96 (Checkstyle:PortletURLBuilderCheck)
     [java] 3: No need to declare variable 'liferayPortletResponse'. Pass the method call directly as parameter on line '83'.: ./modules/apps/content-dashboard/content-dashboard-document-library-impl/src/main/java/com/liferay/content/dashboard/document/library/internal/item/action/SharingCollaboratorsFileEntryContentDashboardItemAction.java 79 (Checkstyle:VariableDeclarationAsUsedCheck)
     [java] 4: No need to call 'portletURL.toString', use 'buildString' instead of 'buildPortletURL', see https://github.com/liferay/liferay-portal/blob/master/modules/util/source-formatter/src/main/resources/documentation/check/builder_check.markdown: ./modules/apps/content-dashboard/content-dashboard-document-library-impl/src/main/java/com/liferay/content/dashboard/document/library/internal/item/action/SharingCollaboratorsFileEntryContentDashboardItemAction.java 96 (Checkstyle:PortletURLBuilderCheck)
     [java] 5: ./modules/apps/content-dashboard/content-dashboard-document-library-impl/src/main/java/com/liferay/content/dashboard/document/library/internal/item/action/provider/SharingCollaboratorsFileEntryContentDashboardItemActionProvider.java expected:<...ry.getFileEntryId(),[
     [java]           themeDisplay.getScopeGroupId())) \{
     [java] 
     [java]         return true;
     [java]       \}
     [java]     \}
     [java]     catch (PortalException portalException) \{
     [java]       _log.error(portalException);
     [java] 
     [java]       return false;
     [java]     \}
     [java] 
     [java]     return false;
     [java]   \}
     [java] 

@liferay-continuous-integration

@cgoncas
Copy link
Collaborator Author

cgoncas commented Jul 26, 2022

ci:test:sf

@cgoncas
Copy link
Collaborator Author

cgoncas commented Jul 26, 2022

ci:test:relevant

@liferay-continuous-integration

✔️ ci:test:stable - 27 out of 27 jobs passed

❌ ci:test:relevant - 46 out of 49 jobs passed in 1 hour 18 minutes

Click here for more details.

This pull is eligible for reevaluation. When this upstream build has completed, using the following CI command will compare this pull request result against a more recent upstream result:

ci:reevaluate:1317401_4366

Base Branch:

Branch Name: master
Branch GIT ID: 7fa932f4cedb7efd94542c0c51422e6a241b536d

Upstream Comparison:

Branch GIT ID: e9a5492319dcfab370b8c5ae5cf26b79237f8531
Jenkins Build URL: EE Development Acceptance (master) - 3596 - 2022-07-26[05:11:55]

ci:test:stable - 27 out of 27 jobs PASSED
27 Successful Jobs:
ci:test:relevant - 46 out of 49 jobs PASSED
46 Successful Jobs:
For more details click here.

Failures unique to this pull:

  1. modules-semantic-versioning-jdk8/0/0
    1. com.liferay.semantic.versioning.SemanticVersioningTest.testSemanticVersioning[/apps/content-dashboard/content-dashboard-api]
      java.lang.AssertionError:   PACKAGE_NAME                                       DELTA      CUR_VER    BASE_VER   REC_VER    WARNINGS  
      = ================================================== ========== ========== ========== ========== ==========
      * com.liferay.content.dashboard.item.action          MINOR      1.2.0      1.2.0      1.3.0      VERSION INCREASE REQUIRED
        <   enum       com.liferay.content.dashboard.item.action.ContentDashboardItemAction$Type
          +   field      SHARING_COLLABORATORS
            +   access     final
            +   access     static
            +   return     com.liferay.content.dashboard.item.action.ContentDashboardItemAction$Type
      [Baseline Warning] Bundle Version Change Recommended: 2.3.0
      

      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.assertTrue(Assert.java:41)
      at org.junit.Assert.assertFalse(Assert.java:64)
      at com.liferay.semantic.versioning.SemanticVersioningTest.testSemanticVersioning(SemanticVersioningTest.java:82)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java...


Failures in common with acceptance upstream results at e9a5492:
  1. central-requirements-jdk8/0/0
    1. com.liferay.portal.modules.ModulesStructureTest.testScanGradleFiles
      junit.framework.AssertionFailedError: Redundant dependency detected in modules/dxp/apps/search-experiences/search-experiences-rest-impl/build.gradle expected:<compileOnly group: "com.fasterxml.jackson.core", name: "jackson-core", version: "2.13.2"> but was:<testCompile group: "com.fasterxml.jackson.core", name: "jackson-core", version: "2.13.2">
      at com.liferay.portal.modules.ModulesStructureTest._testGradleFile(ModulesStructureTest.java:1509)
      at com.liferay.portal.modules.ModulesStructureTest.access$800(ModulesStructureTest.java:68)
      at com.liferay.portal.modules.ModulesStructureTest$4.visitFile(ModulesStructureTest.java:402)
      at com.liferay.portal.modules.ModulesStructureTest$4.visitFile(ModulesStructureTest.java:376)
      at java.nio.file.Files.walkFileTree(Files.java:2670)
      at java.nio.file.Files.walkFileTree(Files.java:2742)
      at com.liferay.portal.modules.ModulesStructureTest.testScanGradleFiles(ModulesStructureTest.java:374)

@cgoncas
Copy link
Collaborator Author

cgoncas commented Jul 27, 2022

ci:forward

@liferay-continuous-integration

CI is automatically triggering the following test suites:

  •     ci:test:relevant
  •     ci:test:sf

The pull request will automatically be forwarded to the user brianchandotcom if the following test suites pass:

  •     ci:test:relevant
  •     ci:test:sf
  •     ci:test:stable

@liferay-continuous-integration

@liferay-continuous-integration

✔️ ci:test:sf - 1 out of 1 jobs passed in 3 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 7fa932f4cedb7efd94542c0c51422e6a241b536d

Sender Branch:

Branch Name: LPS-153687.Backend
Branch GIT ID: 141c5d56b3e6336162d89c365d753b03928bcf60

1 out of 1jobs PASSED
1 Successful Jobs:
For more details click here.

@liferay-continuous-integration

@@ -142,6 +142,10 @@ protected void doServeResource(
"fetchSharingButtonURL",
_getFetchSharingButtonURL(
contentDashboardItem, httpServletRequest)
).put(
"fetchSharingContactsURL",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @cgoncas !
you referenced here fetchSharingCollaboratorsURL but I read here fetchSharingContactsURL. Which one should we use finally? As you said fetchSharingCollaboratorsURL makes more sense

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fetchSharingCollaboratorsURL should be the right one :), could you fix it :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I'll fix it, thxs!

@liferay-continuous-integration

✔️ ci:test:stable - 27 out of 27 jobs passed

✔️ ci:test:relevant - 48 out of 49 jobs passed in 1 hour 25 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 7fa932f4cedb7efd94542c0c51422e6a241b536d

Upstream Comparison:

Branch GIT ID: e9a5492319dcfab370b8c5ae5cf26b79237f8531
Jenkins Build URL: EE Development Acceptance (master) - 3596 - 2022-07-26[05:11:55]

ci:test:stable - 27 out of 27 jobs PASSED
27 Successful Jobs:
ci:test:relevant - 47 out of 49 jobs PASSED
47 Successful Jobs:
For more details click here.

This pull contains no unique failures.


Failures in common with acceptance upstream results at e9a5492:
  1. central-requirements-jdk8/0/0
    1. com.liferay.portal.modules.ModulesStructureTest.testScanGradleFiles
      junit.framework.AssertionFailedError: Redundant dependency detected in modules/apps/static/portal-k8s-agent/portal-k8s-agent-impl/build.gradle expected:<compileOnly group: "com.liferay.portal", name: "com.liferay.portal.impl", version: "default"> but was:<testCompile group: "com.liferay.portal", name: "com.liferay.portal.impl", version: "default">
        at com.liferay.portal.modules.ModulesStructureTest._testGradleFile(ModulesStructureTest.java:1509)
        at com.liferay.portal.modules.ModulesStructureTest.access$800(ModulesStructureTest.java:68)
        at com.liferay.portal.modules.ModulesStructureTest$4.visitFile(ModulesStructureTest.java:402)
        at com.liferay.portal.modules.ModulesStructureTest$4.visitFile(ModulesStructureTest.java:376)
        at java.nio.file.Files.walkFileTree(Files.java:2670)
        at java.nio.file.Files.walkFileTree(Files.java:2742)
        at com.liferay.portal.modules.ModulesStructureTest.testScanGradleFiles(ModulesStructureTest.java:374)
      

@liferay-continuous-integration

All required test suite(s) passed.
Forwarding pull request to brianchandotcom.
Console

@liferay-continuous-integration

Pull request has been successfully forwarded to brianchandotcom#120921
Console

@liferay-continuous-integration

"com_liferay_content_dashboard_web_portlet_" +
"ContentDashboardAdminPortlet"
).setMVCPath(
"/sharing_collaborators_button.jsp"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cgoncas maybe we missed to rename this path to "/sharing_collaborators.jsp"
i'm getting an error I did not realized before:

javax.portlet.PortletException: Path /sharing_collaborators_button.jsp is not accessible by portlet com_liferay_content_dashboard_web_portlet_ContentDashboardAdminPortlet

thxs!

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