maproulette / maproulette/maproulette-backend
Bounding boxes added to priority rules through API get altered.
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 53
- Forks
- 39
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 12
Description
When I use the API to create or update a challenge that has a bounding box highPriorityRule, the first value (x_min) gets munged.
If add this json to the high priority rule:
{"type": "bounds", "operator": "contains", "value": "-98.805051,29.2562939,-98.023766,29.777227"},
then the resulting high priority rule set in the challenge looks like this:

The full text in the value box is: "805051,29.2562939,-98.023766,29.777227"
The first value seems to be getting altered from what was passed in as I would expect it to be
"-98.805051,29.2562939,-98.023766,29.777227"
From the code I gathered that it thinks that the "value" string is a two part string separated by a "."
So I tried adding a garbage string to my value...
{"type": "bounds", "operator": "contains", "value": "bbox.-98.805051,29.2562939,-98.023766,29.777227"},
And that worked!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the API path for creating or updating a challenge and handling a bounds highPriorityRule value. Reproduce the issue with the two JSON examples, then inspect where the value is split or parsed. Done means the negative x_min is preserved for both create and update requests, with regression coverage if the relevant test location is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100