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

Mismatch between query configurations and property path/value for the species layer. #329

Open
qifeng-bai opened this issue Nov 26, 2024 · 0 comments
Assignees
Milestone

Comments

@qifeng-bai
Copy link
Contributor

qifeng-bai commented Nov 26, 2024

The query for the species list is:
https://spatial.ala.org.au/ws/layers.json
This query does not include a date parameter, so it fetches all data. To identify new records, the DiffService needs to compare the previous and current results.

  • JSON ID Path: name
  • JSON Record Path: $[*]

This configuration returns a list of records and uses name as the identifier.

Property Path Configuration:

  • name: layer_count
  • path: $
  • fireWhenNotZero: true
  • fireWhenChange: false

The layer_count property implies that it returns the total number of records when fireWhenNotZero is true. However, this setup is incorrect because the DiffService only returns the length of the last result; it does not compare it with previous records. As mentioned, this query always retrieves all layers.

If fireWhenChange is set to true, the property name layer_count should be renamed to something more descriptive, like layer_name. Ideally, the DiffService should return the name of the last record, allowing for proper tracking of changes.

A simple solution is to set both fireWhenNotZero and fireWhenChange to false, allowing the DiffService to perform a full comparison.

Future work: #330

@qifeng-bai qifeng-bai self-assigned this Nov 26, 2024
@qifeng-bai qifeng-bai added this to the 4.4.0 milestone Nov 26, 2024
qifeng-bai added a commit that referenced this issue Dec 2, 2024
Improve admin page and fix bugs on evaluate methods refactor styles
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

No branches or pull requests

2 participants