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

[5][webservices] add filter by search #42519

Merged
merged 3 commits into from
Mar 2, 2024
Merged

Conversation

alikon
Copy link
Contributor

@alikon alikon commented Dec 14, 2023

Pull Request for Issue #42503 .

Summary of Changes

added filter bt search

Testing Instructions

{{base_path}}/api/index.php/v1/tags?filter[search]=text
{{base_path}}/api/index.php/v1/content/categories?filter[search]=text

Actual result BEFORE applying this Pull Request

N/A

Expected result AFTER applying this Pull Request

response take care of serch filter

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@aberenguer78
Copy link

Sorry I'm new adding feature requests. You mentioned me to test I don't know how to test. There's a new Joomla 4 version??
We need this feature in joomla 4 because we don't have our systems yet prepaired to migrate to joomla 5,
thanks in advance

@alikon
Copy link
Contributor Author

alikon commented Dec 14, 2023

iirc new feature cannot go in 4.x series, if the release lead consider this a bug fix i will do it in the 4.x branch
for test you can copy the changed lines in a j4 site

@aberenguer78
Copy link

I have downloaded CategoriesController and TagsController and tested locally and it works fine.
I have tried to add another filter in the controllers displaylist:
if (\array_key_exists('alias', $apiFilterInfo)) {
$this->modelState->set('filter.alias', $filter->clean($apiFilterInfo['alias'], 'STRING'));
}
But this code doesen't work and I don't know why. The idea is to filter only by the alias field, is possible??
Sample query:
{{base_url}}/{{base_path}}/tags?filter[alias]=provatag2

Please, we need this filter search for the 4.x branch in a new version, thanks


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42519.

@walturbo
Copy link

I have tested this item ✅ successfully on c8da438


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42519.

@Hackwar
Copy link
Member

Hackwar commented Feb 26, 2024

@aberenguer78 could you mark the PR as tested by you in the issue tracker? If you do, then we can mark this as ready to commit and this PR could already be in Joomla 5.1.

@aberenguer78
Copy link

#42503 It's closed. I tested locally on 15th of December locally and it works fine. You, have my comments here :
#42519 (comment)
Walturbo tested it too and it's ok.
I don't know how to mark the issue as tested

@aberenguer78
Copy link

I have tested this item ✅ successfully on c8da438

It was tested successfully on 15/12/2023


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42519.

@Hackwar
Copy link
Member

Hackwar commented Feb 26, 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42519.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Feb 26, 2024
@LadySolveig LadySolveig merged commit db9154c into joomla:5.1-dev Mar 2, 2024
3 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Mar 2, 2024
@LadySolveig
Copy link
Contributor

Thank you @alikon and also for testing and support @aberenguer78 @walturbo @Hackwar

@Quy Quy added this to the Joomla! 5.1.0 milestone Mar 2, 2024
@alikon alikon deleted the patch-21 branch March 3, 2024 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants