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

feat: Add filtering capabilities in events change log [DHIS2-18012] #19268

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

muilpp
Copy link
Contributor

@muilpp muilpp commented Nov 22, 2024

This PR introduces filtering for change logs. These filters differ slightly from the ones we currently use:

  • They accept only one field at a time.
  • They support only the equals operator.
  • Filtering is limited to username, data element, or property.

Another key difference is that while our current filters are UID based, these new filters are string based.

Although the only supported operator is eq, I’ve retained the filter format [field]:[operator]:[filter] used in other endpoints. This way, I've we need to support additional operators in the future, it won’t require a breaking change.

validateFilter(String, Set<String>) is used only for event change logs, but it will be used for attributes as soon as we refactor those change logs, that's why I added it to RequestParamsValidator

Note: ACL validation for data elements is not yet implemented. I will address this in a separate ticket once we decide how data sharing validation on data elements should be handled.

@muilpp muilpp marked this pull request as ready for review November 22, 2024 15:36
@muilpp muilpp requested a review from a team as a code owner November 22, 2024 15:36
Copy link

sonarcloud bot commented Nov 22, 2024

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.

2 participants