Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BACKEND: Change Summary field for CoopProposal is incorrect. #240

Open
maxgraziano opened this issue May 15, 2024 · 1 comment · Fixed by #250
Open

BACKEND: Change Summary field for CoopProposal is incorrect. #240

maxgraziano opened this issue May 15, 2024 · 1 comment · Fixed by #250
Assignees
Labels
backend bug Something isn't working

Comments

@maxgraziano
Copy link
Collaborator

Reported by @domdelorenzo, Verified by @maxgraziano

Environment:
In development environment, using preloaded dataset.

Steps to reproduce:

  1. Authenticate as admin user.

  2. Create an UPDATE proposal record via POST to the /coops/proposal/create/ endpoint.

{
  "operation": "UPDATE",
  "coop_public_id" : 4,
  "coop": {
    "name": "TESTING"
  }
}
  1. Confirm you get a 201 HTTP response. Response below.
{
  "id": 782,
  "requested_by": "chicommons",
  "proposal_status": "PENDING",
  "change_summary": "{\"coop_public_id\": 4, \"requested_by\": \"chicommons\", \"proposal_status\": \"PENDING\", \"operation\": \"UPDATE\", \"requested_datetime\": \"2024-05-15 15:05:33.756841+00:00\"}",
  "requested_datetime": "2024-05-15T10:05:33.756841-05:00",
  "coop": {
    "id": 780,
    "types": [
      {
        "name": "Housing Coop"
      }
    ],
    "contact_methods": [
      {
        "id": 1,
        "type": "PHONE",
        "is_public": true,
        "phone": "+13129437500",
        "email": null
      }
    ],
    "people": [],
    "addresses": [
      {
        "id": 6,
        "address": {
          "id": 6,
          "street_address": "1335 N ASTOR ST",
          "city": "Chicago",
          "county": "Cook County",
          "state": "IL",
          "postal_code": "60610",
          "country": "US",
          "latitude": 41.9069583,
          "longitude": -87.6271603
        },
        "is_public": true
      }
    ],
    "status": "PROPOSAL",
    "name": "TESTING",
    "web_site": "https://www.dkcondo.com/managed-associations/1335-astor-co-op/",
    "description": "",
    "is_public": true,
    "scope": "",
    "tags": "",
    "coop_public": 4
  },
  "review_notes": null,
  "reviewed_datetime": null,
  "coop_public": 4,
  "reviewed_by": null
}

Expected Behavior:
The change_summary field should store the changes of the proposal. In other words, the "coop" field of the UPDATE proposal.

@maxgraziano maxgraziano added the bug Something isn't working label May 15, 2024
@maxgraziano maxgraziano self-assigned this May 29, 2024
@maxgraziano
Copy link
Collaborator Author

Fix will only fix change_summary for newly created proposal. It will not got back and fix previously created change_summary.

maxgraziano added a commit to maxgraziano/maps that referenced this issue May 29, 2024
@maxgraziano maxgraziano linked a pull request May 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working
Projects
Status: Test-QA
Development

Successfully merging a pull request may close this issue.

1 participant