AeroGear
  1. AeroGear
  2. AEROGEAR-359

Removing tags or projects should update associated tasks

    Details

    • Type: Enhancement Enhancement
    • Status: Resolved Resolved (View Workflow)
    • Priority: Blocker Blocker
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.0.0.M5
    • Component/s: site
    • Security Level: Public (Everyone can see)
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      If a tag or project is deleted, any tasks that have that project or tag associated with them should be updated. Then, the response should include an array of id's of tasks that were updated so that I can refresh those tasks on the client.

        Activity

        Hide
        Kris Borchers
        added a comment -

        For PUT on tag and project, please return a 200 instead of 204 with the updated record and an array of id's of linked tasks.

        Example:

        { "data": { "id": 2, ... }, "tasks": [1,4,5,7] }

        For DELETE on tag and project, return a 200 with just the array of linked tasks

        Example:

        { "tasks": [1,4,5,7] }

        Show
        Kris Borchers
        added a comment - For PUT on tag and project, please return a 200 instead of 204 with the updated record and an array of id's of linked tasks. Example: { "data": { "id": 2, ... }, "tasks": [1,4,5,7] } For DELETE on tag and project, return a 200 with just the array of linked tasks Example: { "tasks": [1,4,5,7] }
        Hide
        Bruno Oliveira
        added a comment - - edited

        Hi Kris, I didn't change the return from PUT, only DELETE, let me know if this is what you want and I can do the same for PUT. Also check the tag and projects removal, it should work know.

        My tests:

        curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '

        {"title": "test", "style":"mydescription"}

        ' http://localhost:8080/todo-server/project/
        curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '

        {"title": "test", "style":"mydescription"}

        ' http://localhost:8080/todo-server/project/

        curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '

        {"title":"tag1","style":"fancy1"}

        ' http://localhost:8080/todo-server/tag/
        curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '

        {"title":"tag2","style":"fancy2"}

        ' http://localhost:8080/todo-server/tag/
        curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '

        {"title":"tag3","style":"fancy3"}

        ' http://localhost:8080/todo-server/tag/

        curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '

        {"title":"Test POST1","date":"2012-08-08","description":"This is test data for abstractj :)","tags":[1,2], "project":1}

        ' http://localhost:8080/todo-server/task
        curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '

        {"title":"Test POST2","date":"2012-08-08","description":"This is test data for abstractj :)","tags":[1,2], "project":1}

        ' http://localhost:8080/todo-server/task
        curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '

        {"title":"Test POST3","date":"2012-08-08","description":"This is test data for abstractj :)","tags":[1,2], "project":1}

        ' http://localhost:8080/todo-server/task

        curl -v -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d '

        {"title":"ta7","style":"fancy3"}

        ' http://localhost:8080/todo-server/tag/1

        curl -v -H "Accept: application/json" -H "Content-type: application/json" -X GET http://localhost:8080/todo-server/tag/
        curl -v -H "Accept: application/json" -H "Content-type: application/json" -X GET http://localhost:8080/todo-server/task/

        curl -v -H "Accept: application/json" -H "Content-type: application/json" -X DELETE http://localhost:8080/todo-server/tag/1
        curl -v -H "Accept: application/json" -H "Content-type: application/json" -X DELETE http://localhost:8080/todo-server/project/1

        Show
        Bruno Oliveira
        added a comment - - edited Hi Kris, I didn't change the return from PUT, only DELETE, let me know if this is what you want and I can do the same for PUT. Also check the tag and projects removal, it should work know. My tests: curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"title": "test", "style":"mydescription"} ' http://localhost:8080/todo-server/project/ curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"title": "test", "style":"mydescription"} ' http://localhost:8080/todo-server/project/ curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"title":"tag1","style":"fancy1"} ' http://localhost:8080/todo-server/tag/ curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"title":"tag2","style":"fancy2"} ' http://localhost:8080/todo-server/tag/ curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"title":"tag3","style":"fancy3"} ' http://localhost:8080/todo-server/tag/ curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"title":"Test POST1","date":"2012-08-08","description":"This is test data for abstractj :)","tags":[1,2], "project":1} ' http://localhost:8080/todo-server/task curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"title":"Test POST2","date":"2012-08-08","description":"This is test data for abstractj :)","tags":[1,2], "project":1} ' http://localhost:8080/todo-server/task curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"title":"Test POST3","date":"2012-08-08","description":"This is test data for abstractj :)","tags":[1,2], "project":1} ' http://localhost:8080/todo-server/task curl -v -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d ' {"title":"ta7","style":"fancy3"} ' http://localhost:8080/todo-server/tag/1 curl -v -H "Accept: application/json" -H "Content-type: application/json" -X GET http://localhost:8080/todo-server/tag/ curl -v -H "Accept: application/json" -H "Content-type: application/json" -X GET http://localhost:8080/todo-server/task/ curl -v -H "Accept: application/json" -H "Content-type: application/json" -X DELETE http://localhost:8080/todo-server/tag/1 curl -v -H "Accept: application/json" -H "Content-type: application/json" -X DELETE http://localhost:8080/todo-server/project/1

          People

          • Assignee:
            Bruno Oliveira
            Reporter:
            Kris Borchers
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: