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

Fix(additional-entity) allow custom properties to create entities list #1861

Merged
merged 1 commit into from
Nov 9, 2024

Conversation

Sujanadh
Copy link
Contributor

@Sujanadh Sujanadh commented Nov 8, 2024

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation
  • πŸ§‘β€πŸ’» Refactor
  • βœ… Test
  • πŸ€– Build or CI
  • ❓ Other (please specify)

Related Issue

There were issues with custom additional entities geojson properties which weren't supported by odk-central failing the creation of entities and dataset properties. Some keywords of odk-central such as uuid, name, label are not supported by odk-central to avoid duplicate entries.

Describe this PR

This PR fixes the mentioned issue where valid properties are prepared from the uploaded additional entity geojson.

changes

  • Custom properties are filtered in one step to include only valid, sanitized properties free of reserved keywords. Invalid properties (having invalid characters such as ":") are excluded to prevent API errors.
  • Any default property missing from the custom list is appended to ensure dataset requirements for fmtm in ODK Central.

Screenshots

N/A

Alternative Approaches Considered

Did you attempt any other approaches that are not documented in code?

Review Guide

Notes for the reviewer. How to test this change?

Checklist before requesting a review

[optional] What gif best describes this PR or how it makes you feel?

@Sujanadh Sujanadh requested a review from spwoodcock November 8, 2024 11:45
@Sujanadh Sujanadh self-assigned this Nov 8, 2024
@github-actions github-actions bot added bug Something isn't working backend Related to backend code labels Nov 8, 2024
@spwoodcock spwoodcock added priority:high Should be addressed as a priority effort:low Likely a few hours labels Nov 9, 2024
Copy link
Member

@spwoodcock spwoodcock left a comment

Choose a reason for hiding this comment

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

Excellent stuff πŸ‘

@spwoodcock spwoodcock merged commit 9ed96a6 into development Nov 9, 2024
6 checks passed
@spwoodcock spwoodcock deleted the fix/additional-entity-creation branch November 9, 2024 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code bug Something isn't working effort:low Likely a few hours priority:high Should be addressed as a priority
Projects
Development

Successfully merging this pull request may close these issues.

2 participants