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-133166 Order By Modification date for Docs and Media folders will display the Last Post Date #1893

Closed

Conversation

IstvanD
Copy link

@IstvanD IstvanD commented May 28, 2021

Dear Team,

Could you please review this pull request?

One of the customers finds it confusing that while the folders are sorted by modification date the Modified Date column in shows their Last Post Date.
To be clear, these two fields are updated at different events:

  • modifiedDate is updated when the folder itself is modified eg. its title is changed or a description is added
  • lastPostDate is updated when a file or subfolder is created in the folder

The customer would be fine with it when the modifiedDate would be shown instead of lastPostDate. The changes in the pull achieve exactly that.
But I'm not sure if we should alter the behavior this way. For example, other users would expect to still view the lastPostDate.

Maybe we could add an option for sorting by lastPostDate? This would be tricky though as all of the sortings for files, folders and shortcuts are done by Repository Model Comparators (for example RepositoryModelModifiedDateComparator), and while all repository entries have a modifiedDate field, only folders have a lastPostDate field. A Repository Model Comparators thus would not be able to compare base on lastPostDate.

Alternatively, should we suggest a workaround/customization for the customer?

Thank you and best regards,
István

@liferay-continuous-integration
Copy link
Collaborator

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.

@adolfopa
Copy link
Collaborator

ci:test:sf

@adolfopa
Copy link
Collaborator

ci:test:relevant

@liferay-continuous-integration
Copy link
Collaborator

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

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 226c3227101285be39c1743f46b1f411d0eff0a1

Sender Branch:

Branch Name: LPS-133166
Branch GIT ID: 4f2eee32a30fb914cf5b77bc3cb1cb316bbfd0dd

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

@liferay-continuous-integration
Copy link
Collaborator

@liferay-continuous-integration
Copy link
Collaborator

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

❌ ci:test:relevant - 19 out of 23 jobs passed in 1 hour 26 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 226c3227101285be39c1743f46b1f411d0eff0a1

Upstream Comparison:

Branch GIT ID: 226c3227101285be39c1743f46b1f411d0eff0a1
Jenkins Build URL: Acceptance Upstream DXP (master) #1923

ci:test:stable - 9 out of 9 jobs PASSED
9 Successful Jobs:
ci:test:relevant - 19 out of 23 jobs PASSED
19 Successful Jobs:
For more details click here.

Failures unique to this pull:

  1. test-portal-acceptance-pullrequest-batch(master)/semantic-versioning-jdk8/0
    Job Results:

    0 Tests Passed.
    1 Test Failed.

    1. AXIS_VARIABLE=0,label_exp=!master #387089
      clean-up-java-processes:
         [delete] Deleting: /opt/dev/projects/github/liferay-portal/clean_up_java_processes.sh
      [stopwatch] [run.batch.test.setup: 45:48.128 sec]
           [echo] run.batch.test.action.start.timestamp: 05-31-2021 02:28:59:834 PDT
           [echo] Checking for baseline log files.
           [echo] 
           [echo] ##
           [echo] ## /opt/dev/projects/github/liferay-portal/baseline-reports/portal-impl-7.log
           [echo] ##
           [echo] 
      [beanshell] 
           [echo] 
           [echo] ##
           [echo] ## /opt/dev/projects/github/liferay-portal/baseline-reports/portal-kernel-11.log
           [echo] ##
           [echo] 
      [beanshell] 
      [stopwatch] [run.batch.test.action: 15.572 sec]
           [echo] Semantic versioning is incorrect.
            [get] Getting: http://test-1-9/job/test-portal-acceptance-pullrequest-batch(master)/AXIS_VARIABLE=0,label_exp=!master/387089//consoleText
            [get] To: /opt/dev/projects/github/liferay-portal/20210531022915407.txt
         [delete] Deleting: /opt/dev/projects/github/liferay-portal/20210531022915407.txt
         [delete] Deleting: /opt/dev/projects/github/liferay-portal/null1124193316.properties
  2. test-portal-acceptance-pullrequest-batch(master)/unit-jdk8/0
    Job Results:

    1 Test Passed.
    0 Tests Failed.


Failures in common with acceptance upstream results at 226c322:
  1. test-portal-acceptance-pullrequest-batch(master)/modules-integration-mysql57-jdk8/0
    Job Results:

    1373 Tests Passed.
    1 Test Failed.

    1. AXIS_VARIABLE=3,label_exp=!master #470464
      1. com.liferay.portal.log.assertor.PortalLogAssertorTest.testScanXMLLog
        junit.framework.AssertionFailedError: 
        JSON storage adapter is deprecated, using default storage adapter
        	at com.liferay.portal.log.assertor.PortalLogAssertorTest.scanXMLLogFile(PortalLogAssertorTest.java:171)
        	at com.liferay.portal.log.assertor.PortalLogAssertorTest$1.visitFile(PortalLogAssertorTest.java:98)
        	at com.liferay.portal.log.assertor.PortalLogAssertorTest$1.visitFile(PortalLogAssertorTest.java:88)
        	at java.nio.file.Files.walkFileTree(Files.java:2670)
        	at java.nio.file.Files.walkFileTree(Files.java:2742)
        	at com.liferay.portal.log.assertor.PortalLogAssertorTest.testScanXMLLog(PortalLogAssertorTest.java:86)
        

@liferay-continuous-integration
Copy link
Collaborator

@IstvanD
Copy link
Author

IstvanD commented Jun 1, 2021

Dear Team,

I was wondering if you could find the time to review the pull request.
Please let me know if you need any help or explanation.

Thank you and best regards,
István

@adolfopa
Copy link
Collaborator

adolfopa commented Jun 1, 2021

ci:test:relevant

@liferay-continuous-integration
Copy link
Collaborator

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

✔️ ci:test:relevant - 22 out of 23 jobs passed in 2 hours 29 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 874bdcaff61d6290bc627a667d9cf0c8b0a01516

Upstream Comparison:

Branch GIT ID: 48d8c4c22e5149acd40b01618af8598603d7117a
Jenkins Build URL: Acceptance Upstream DXP (master) #1925

ci:test:stable - 9 out of 9 jobs PASSED
9 Successful Jobs:
ci:test:relevant - 21 out of 23 jobs PASSED
21 Successful Jobs:
For more details click here.

This pull contains no unique failures.


Failures in common with acceptance upstream results at 48d8c4c:
  1. test-portal-acceptance-pullrequest-batch(master)/modules-integration-mysql57-jdk8/0
    Job Results:

    1374 Tests Passed.
    1 Test Failed.

    1. AXIS_VARIABLE=3,label_exp=!master #463672
      1. com.liferay.portal.log.assertor.PortalLogAssertorTest.testScanXMLLog
        junit.framework.AssertionFailedError: 
        JSON storage adapter is deprecated, using default storage adapter
        	at com.liferay.portal.log.assertor.PortalLogAssertorTest.scanXMLLogFile(PortalLogAssertorTest.java:171)
        	at com.liferay.portal.log.assertor.PortalLogAssertorTest$1.visitFile(PortalLogAssertorTest.java:98)
        	at com.liferay.portal.log.assertor.PortalLogAssertorTest$1.visitFile(PortalLogAssertorTest.java:88)
        	at java.nio.file.Files.walkFileTree(Files.java:2670)
        	at java.nio.file.Files.walkFileTree(Files.java:2742)
        	at com.liferay.portal.log.assertor.PortalLogAssertorTest.testScanXMLLog(PortalLogAssertorTest.java:86)
        

@liferay-continuous-integration
Copy link
Collaborator

@adolfopa
Copy link
Collaborator

adolfopa commented Jun 2, 2021

@IstvanD I'll keep this on hold for a while. I would like to keep using lastPostDate, and change the sorting logic so that it uses lastPostDate for folders. If it is too tricky to fix that, I'll forward your PR.

@IstvanD
Copy link
Author

IstvanD commented Jun 2, 2021

Hi @adolfopa

I have tried to find a method for adding lastPostDate sorting option for folder's but I ran into the complex problems outlined above, so I couldn't make it.

Therefore, please forward the PR.

Thank you and best regards,
István

@IstvanD
Copy link
Author

IstvanD commented Jun 7, 2021

Hi @adolfopa

Will this pr be forwarded or should we indeed go with another solution?

Best regards,
István

@adolfopa
Copy link
Collaborator

adolfopa commented Jun 7, 2021

I'll look into that tomorrow. I'll try to extend the RepositoryModelComparator API to cater for this case.

@adolfopa
Copy link
Collaborator

adolfopa commented Jun 7, 2021

It is not impossible to support this, but it is too messy, and involves creating new API in core. I think it is best to keep it simple and uniform, so I'll forward your pull (even if it changes behaviour slightly, it is more consistent).

@adolfopa
Copy link
Collaborator

adolfopa commented Jun 7, 2021

ci:forward

@liferay-continuous-integration
Copy link
Collaborator

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
Copy link
Collaborator

Skipping previously passed test suites:
ci:test:relevant
ci:test:sf

@liferay-continuous-integration
Copy link
Collaborator

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

@liferay-continuous-integration
Copy link
Collaborator

Pull request has been successfully forwarded to brianchandotcom#102835
Console

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