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

EZP-32219: Fix ContentType sorting defaults has no effect on new created objects #146

Merged
merged 1 commit into from
Dec 11, 2020
Merged

EZP-32219: Fix ContentType sorting defaults has no effect on new created objects #146

merged 1 commit into from
Dec 11, 2020

Conversation

ITernovtsii
Copy link
Contributor

@ITernovtsii ITernovtsii commented Dec 8, 2020

Question Answer
JIRA issue EZP-32219
Type bug
Target eZ Platform version v3.2
BC breaks no
Doc needed yes

Steps to reproduce:

  1. Create new ContentType i.e. "News".
  2. Add a single Textline field i.e. "Title".
  3. Set "Sort children by default by" to "Location priority"
  4. Set "Sort children by default in order" to "Descending".
  5. Create new News content anywhere.
  6. Observe Sub-items sorting order in the Details tab for this content.

Expected result:
Sub-items sorting for new content should have the same value as one that has been set in ContentType.

Actual result:
Sub-items sorting for new content is not the same as one that has been set in this ContentType.

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (master for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review (ping @ezsystems/php-dev-team).

@ITernovtsii ITernovtsii changed the title EZP-32219 - Fix ContentType sorting defaults has no effect on new created objects EZP-32219: Fix ContentType sorting defaults has no effect on new created objects Dec 8, 2020
@ITernovtsii
Copy link
Contributor Author

ITernovtsii commented Dec 8, 2020

failed tests and code duplications are unrelated to the PR
let me know if there is anything I can improve here

@micszo micszo requested a review from a team December 10, 2020 07:10
@adamwojs adamwojs added the Bug Something isn't working label Dec 10, 2020
@adamwojs
Copy link
Member

failed tests and code duplications are unrelated to the PR

Confirm. Unit tests are failing on 1.0 branch as well.

@adamwojs
Copy link
Member

adamwojs commented Dec 10, 2020

@ITernovtsiy Unit tests has been fixed in #140. However branch 1.0 is no longer supported, that's why there wasn't patch for it. Could you please change PR target branch to 1.1 1.2 (and rebase)?

@micszo
Copy link
Member

micszo commented Dec 10, 2020

@adamwojs @ITernovtsiy in fact it could be rebased to 1.2 since 1.1 is past EOM also (https://support.ibexa.co/Public/Service-Life), unless this is a customer issue I suppose.

@adamwojs
Copy link
Member

You are right @micszo. My bad.

@ITernovtsii ITernovtsii changed the base branch from 1.0 to 1.2 December 10, 2020 10:31
@ITernovtsii
Copy link
Contributor Author

in fact it could be rebased to 1.2 since 1.1 is past EOM also (https://support.ibexa.co/Public/Service-Life),

Great, rebased to 1.2 )

unless this is a customer issue I suppose.

I have extended and fixed this service in project code, so it's not an issue for the customer anymore)

Thanks.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@bogusez
Copy link

bogusez commented Dec 11, 2020

@ITernovtsiy should your change fix the issue for content created before fix?

@ITernovtsii
Copy link
Contributor Author

@bogusez No, and I don't think it's possible, as you'll not be able to determine where content sorting was intentionally changed to Name/Asc, and where it was a result of the bug.
Probably, we can develop some simple command which will accept content type and change all locations to match default sorting (where location is Name/Asc).

@bogusez
Copy link

bogusez commented Dec 11, 2020

@bogusez No, and I don't think it's possible, as you'll not be able to determine where content sorting was intentionally changed to Name/Asc, and where it was a result of the bug.
Probably, we can develop some simple command which will accept content type and change all locations to match default sorting (where location is Name/Asc).

Ok thank you, just wanted to make sure.

@adamwojs adamwojs merged commit 54f4244 into ezsystems:1.2 Dec 11, 2020
@adamwojs
Copy link
Member

Thank you for contribution @ITernovtsiy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working QA approved
Development

Successfully merging this pull request may close these issues.

6 participants