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

Add support for OR operation data filter for date fields #2704

Merged
merged 33 commits into from
Sep 19, 2024

Conversation

kelvin-muchiri
Copy link
Contributor

@kelvin-muchiri kelvin-muchiri commented Sep 17, 2024

Changes / Features implemented

Add support for OR operation with date fields when filter on endpoint /api/v1/data

Steps taken to verify this change does what is intended

  • QA

Before submitting this PR for review, please make sure you have:

  • Included tests
  • Updated documentation

Closes #2698

@kelvin-muchiri kelvin-muchiri marked this pull request as ready for review September 17, 2024 09:23
@kelvin-muchiri kelvin-muchiri self-assigned this Sep 17, 2024
@kelvin-muchiri kelvin-muchiri marked this pull request as draft September 17, 2024 11:05
@kelvin-muchiri kelvin-muchiri marked this pull request as ready for review September 18, 2024 07:18
fix wrong-import-order / standard import "from builtins import str as text" should be placed before "import six"
fix wrong-import-order / third party import "import six" should be placed before "from onadata.libs.utils.common_tags import KNOWN_DATE_FORMATS"
@kelvin-muchiri kelvin-muchiri merged commit b5cde55 into main Sep 19, 2024
10 checks passed
@kelvin-muchiri kelvin-muchiri deleted the 2698-or-filter-date branch September 19, 2024 12:41
kelvin-muchiri added a commit that referenced this pull request Sep 24, 2024
* add support for querying "or" data by meta data fields

* add test

* add test

* remove extra underscore

* add tests

* add test

* refactor code

* add support for ISO date format when filtering data

* refactor code

* refactor code

* refactor code

* update documentation

* add support for date format %Y-%m-%dT%H:%M:%S%z data endpoint filter

* remove unnecessary parsing for dates

* revert modified test

* update docs

* update docs

* update docs

* update docs

* update tests

* remove unsupport example from docs

* remove tests for unsupported operation

* handle invalida date formats when filtering data

* rename tests

* update doc string

* remove commented code

* update tag for ona-oidc

* enhance error message

* fix import lint error

fix wrong-import-order / standard import "from builtins import str as text" should be placed before "import six"

* fix lint error

fix wrong-import-order / third party import "import six" should be placed before "from onadata.libs.utils.common_tags import KNOWN_DATE_FORMATS"

* fix indentation

* enhance error message

* fix lint error line-too-long
kelvin-muchiri added a commit that referenced this pull request Sep 24, 2024
* add support for querying "or" data by meta data fields

* add test

* add test

* remove extra underscore

* add tests

* add test

* refactor code

* add support for ISO date format when filtering data

* refactor code

* refactor code

* refactor code

* update documentation

* add support for date format %Y-%m-%dT%H:%M:%S%z data endpoint filter

* remove unnecessary parsing for dates

* revert modified test

* update docs

* update docs

* update docs

* update docs

* update tests

* remove unsupport example from docs

* remove tests for unsupported operation

* handle invalida date formats when filtering data

* rename tests

* update doc string

* remove commented code

* update tag for ona-oidc

* enhance error message

* fix import lint error

fix wrong-import-order / standard import "from builtins import str as text" should be placed before "import six"

* fix lint error

fix wrong-import-order / third party import "import six" should be placed before "from onadata.libs.utils.common_tags import KNOWN_DATE_FORMATS"

* fix indentation

* enhance error message

* fix lint error line-too-long
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.

OR filter not working with date time fields
2 participants