Skip to content

Fix percent mapped calculation after task invalidation#7125

Merged
ramyaragupathy merged 1 commit intohotosm:developfrom
heathdutton:bugfix/6578-fix-percent-mapped-calculation
Jan 14, 2026
Merged

Fix percent mapped calculation after task invalidation#7125
ramyaragupathy merged 1 commit intohotosm:developfrom
heathdutton:bugfix/6578-fix-percent-mapped-calculation

Conversation

@heathdutton
Copy link
Copy Markdown
Contributor

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

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation
  • 🧑‍💻 Refactor
  • ✅ Test
  • 🤖 Build or CI
  • ❓ Other (please specify)

Related Issue

Describe this PR

When tasks are invalidated (marked as "More Mapping Needed"), the cached task counters in the projects table can become stale, causing percentMapped to incorrectly show 100%. This prevents users from selecting READY tasks for mapping.

This fix calculates percentages directly from actual task states in the tasks table instead of relying on cached counters, ensuring the displayed percentages always reflect the current state.

Use real-time task counts from tasks table instead of cached counters
in projects table to ensure percentMapped reflects current state after
task invalidation.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jan 2, 2026

@ramyaragupathy ramyaragupathy merged commit c9827b6 into hotosm:develop Jan 14, 2026
7 of 9 checks passed
@ramyaragupathy ramyaragupathy mentioned this pull request Jan 15, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error message when selecting "More Mapping Needed" task

3 participants