Skip to content

Add priority bounds to challenge#1190

Merged
CollinBeczak merged 6 commits into
mainfrom
add-priority-bounds-to-challenge
Jul 8, 2025
Merged

Add priority bounds to challenge#1190
CollinBeczak merged 6 commits into
mainfrom
add-priority-bounds-to-challenge

Conversation

@CollinBeczak

Copy link
Copy Markdown
Contributor

Frontend implementation: maproulette/maproulette3#2681

This PR extends MapRoulette's challenge priority system by adding geographic bounds-based priority setting. Now, challenge creators can also set task priorities based on whether tasks fall within specific geographic boundaries.

Priority Resolution Logic

  • Bounds take precedence: Geographic bounds are checked first, before property-based rules
  • Fallback to rules: If no bounds match, the system falls back to existing property-based priority rules
  • Default priority: If neither bounds nor rules match, uses the challenge's default priority

Database Changes

  • Added three new nullable VARCHAR columns to the challenges table:
    • high_priority_bounds
    • medium_priority_bounds
    • low_priority_bounds

- Simplified the logic for checking if geometries (Point, LineString, GeometryCollection) are within bounding polygons.
- Introduced a new helper method `checkGeometryWithinBounds` to handle various GeoJSON geometry types.
- Improved error handling during geometry parsing and processing.
@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2025

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
13.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@CollinBeczak CollinBeczak merged commit 444ea5c into main Jul 8, 2025
8 of 9 checks passed
@CollinBeczak CollinBeczak deleted the add-priority-bounds-to-challenge branch July 8, 2025 17:02
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.

1 participant