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

[API] Support combine multiple record response status filters #3259

Closed
Tracked by #3098
frascuchon opened this issue Jun 23, 2023 · 0 comments · Fixed by #3359
Closed
Tracked by #3098

[API] Support combine multiple record response status filters #3259

frascuchon opened this issue Jun 23, 2023 · 0 comments · Fixed by #3359
Assignees

Comments

@frascuchon
Copy link
Member

frascuchon commented Jun 23, 2023

Affected fetch record endpoints should accept to combine several response_status filters:

  • response_status=missing|submitted or response_status=draft|discarded
  • Or by defining query param several times response_status=missing&response_status=submitted
@frascuchon frascuchon mentioned this issue Aug 1, 2023
3 tasks
gabrielmbmb added a commit that referenced this issue Aug 2, 2023
# Description

This PR updates the `GET /api/v1/me/datasets/{dataset_id}/records` and
`POST /api/v1/me/datasets/{dataset_id}/records/search` and the
`SearchEngine.search` method, so records can be filtered using more than
one response status
(`/api/v1/...?response_status=submitted&response_status=discarded`).

Closes #3259

**Type of change**

- [x] New feature (non-breaking change which adds functionality)

**How Has This Been Tested**

Locally and the unit tests for the endpoints and `SearchEngine` have
been updated to cover the cases in which more than one value for the
response status filter is provided.

**Checklist**

- [ ] I added relevant documentation
- [x] follows the style guidelines of this project
- [x] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] I filled out [the contributor form](https://tally.so/r/n9XrxK)
(see text above)
- [x] I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)

---------

Co-authored-by: Paco Aranda <francis@argilla.io>
keithCuniah pushed a commit that referenced this issue Aug 3, 2023
# Description

This PR updates the `GET /api/v1/me/datasets/{dataset_id}/records` and
`POST /api/v1/me/datasets/{dataset_id}/records/search` and the
`SearchEngine.search` method, so records can be filtered using more than
one response status
(`/api/v1/...?response_status=submitted&response_status=discarded`).

Closes #3259

**Type of change**

- [x] New feature (non-breaking change which adds functionality)

**How Has This Been Tested**

Locally and the unit tests for the endpoints and `SearchEngine` have
been updated to cover the cases in which more than one value for the
response status filter is provided.

**Checklist**

- [ ] I added relevant documentation
- [x] follows the style guidelines of this project
- [x] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] I filled out [the contributor form](https://tally.so/r/n9XrxK)
(see text above)
- [x] I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)

---------

Co-authored-by: Paco Aranda <francis@argilla.io>
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 a pull request may close this issue.

2 participants