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

Rename order parameter #234

Merged

Conversation

Hugo-Prossaird
Copy link
Contributor

This PR fixes the order parameter. To order by a column and select a direction, we must use order, not orderBy/orderByDir.

Example:
order[1]=ASC&order[0]=timestamp

Copy link
Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

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

Are you sure? I was trying to find a test that would prove this change but found only this which would suggest the original version:

https://github.com/mautic/mautic/blob/58a35fd04c64a790c3f939036fe211fba4877120/app/bundles/CoreBundle/Tests/Unit/Entity/CommonRepositoryTest.php#L74-L82

@Hugo-Prossaird
Copy link
Contributor Author

Are you sure? I was trying to find a test that would prove this change but found only this which would suggest the original version:

https://github.com/mautic/mautic/blob/58a35fd04c64a790c3f939036fe211fba4877120/app/bundles/CoreBundle/Tests/Unit/Entity/CommonRepositoryTest.php#L74-L82

You can see the issue here:
https://github.com/mautic/mautic/blob/58a35fd04c64a790c3f939036fe211fba4877120/app/bundles/LeadBundle/Controller/Api/LeadApiController.php#L404

I believe that this route doesn’t use the common repository class you mentioned in the test. I believe it’s a specific route that uses its own method with custom logic.

Copy link
Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

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

You are right 👍

@RCheesley
Copy link
Member

The build failure is due to us having DDOS protection on one of our servers, so this is good to go.

@RCheesley RCheesley merged commit a7a4f2c into mautic:5.x Jan 8, 2025
1 of 2 checks passed
@RCheesley
Copy link
Member

@all-contributors please add @Hugo-Prossaird for docs

Copy link
Contributor

@RCheesley

I've put up a pull request to add @Hugo-Prossaird! 🎉

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

Successfully merging this pull request may close these issues.

3 participants