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-30567: Impl. ez_query:pagingQueryAction to handle pagination #2651

Merged
merged 2 commits into from
Oct 24, 2019

Conversation

jlchassaing
Copy link
Contributor

@jlchassaing jlchassaing commented May 20, 2019

Question Answer
JIRA issue EZP-30567
Improvement yes
New feature yes
Target version master (8.0@dev) for eZ Platform v3.0.
BC breaks no
Tests pass yes
Doc needed yes

The ez_query:pagingQueryAction will return a pagerFanta object set to the assign_to_result parameter.

alongside with the assign_to_result param as described a limit parameter can be added to set the page number of items.

QA

  • Configure and test results of ez_query:pagingQueryAction Query controller (very well described by the Behat tests in the PR).

TODO:

  • Implement ez_query:pagingQueryAction.
  • Implement tests.
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

@andrerom
Copy link
Contributor

ping @bdunogier

@alongosz alongosz changed the title add pagingQueryAction to ez_query controler to return a pagerFanta result using a query_type EZP-30567: Impl. ez_query:pagingQueryAction to handle pagination May 28, 2019
Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

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

@jlchassaing

Target version 7.x

Current master is 8.0. Feature development process for 7.x has been closed. Just mentioning this so there's no surprise once the feature is merged.

I see that you've skipped most of the points from the checklist. They would need to be addressed before we can process the PR.

Besides:

@jlchassaing
Copy link
Contributor Author

@alongosz thank you for your comments. I fixed the comments, ran fix-cs and did code changes. This feature is really useful and I think it could be merged to 8.x release.

Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

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

There's one outstanding item from the checklist - implement tests. AFAICS for Query Controller we have BDD tests so something similar would be the best choice. Test also allows you to clearly state what your feature does, so it's good for more than one reason.

I also looked deeper at the implementation and have one more remark:

@andrerom
Copy link
Contributor

andrerom commented Jun 3, 2019

Nice work on the tests @jlchassaing 👍

@SylvainGuittard
Copy link
Contributor

Thanks for your contribution @jlchassaing

@jlchassaing
Copy link
Contributor Author

Does someone have a clue why I'm getting this travis fail ?

Copy link
Member

@bdunogier bdunogier left a comment

Choose a reason for hiding this comment

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

Looks good to me, I like the feature !

Added a suggestion for a simplification of the behat test, but it's not a must-have. It would shorten the file a lot though.

Also, I was wondering if handling an option in the existing controller would have been a better choice than a separate controller.

@alongosz
Copy link
Member

alongosz commented Oct 18, 2019

Status: blocked by CI, partially solved via #2834, trying to fix failing new tests.

@alongosz alongosz force-pushed the EZP-30567 branch 2 times, most recently from e575cbb to 0cd65dc Compare October 22, 2019 14:37
QueryController pagingQueryAction returns query results as a
Pagerfanta instance

Co-Authored-By: André R. <[email protected]>
@alongosz
Copy link
Member

@micszo you can proceed with QA here.

Copy link
Member

@micszo micszo left a comment

Choose a reason for hiding this comment

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

QA Approved on eZ Platform EE master.

@micszo micszo removed their assignment Oct 23, 2019
@alongosz alongosz merged commit 83b375d into ezsystems:master Oct 24, 2019
@alongosz
Copy link
Member

Thank you @jlchassaing 🎉

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

Successfully merging this pull request may close these issues.

7 participants