maproulette / maproulette/maproulette-backend

setting task location through task API silently fails

Open
#91 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

BACKLOG
Dominant language
Scala
Stars
53
Forks
39
Avg merge
1d 17h
Merged PRs (30d)
12

Description

Posting the JSON below to /api/v2/tasks silently fails with

WARN - Invalid json for type: {"obj.location":[{"msg":["error.expected.jsstring"],"args":[]}]}

on the console.

[
    {
        "name": "ExampleTask",
        "identifier": "Custom_Identifier",
        "parent": 2,
        "instruction": "Task instruction",
        "geometries": {
            "type": "FeatureCollection",
            "features":
                [{
                    "type": "Feature",
                    "geometry": {
                        "type": "Point",
                        "coordinates": [77.6255107,40.5872232]
                    },
                    "properties": {}
                }]
        },
        "location": {"type":"Point","coordinates":[77.6255107,40.5872232]},
        "status": 0
    }
]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the POST to /api/v2/tasks with the JSON shown, then trace the task API's validation of the location field. Done means the request accepts the provided point location without silently failing or logging the error.expected.jsstring warning.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.