Closed gopal2020 closed 4 years ago
It looks like there was a regression in our recommendation form. It no longer includes vote counts and location. These are required by CRM and not providing them will cause the error.
This could also be happening because a recommendation was already submitted in CRM?
submitted as BP. Not a regression. error message from crm is something about statecode and statuscode. These are probably misaligned.
statecode: 1
statuscode: 2
CRM is unhappy with this combo bc they don't validate together
"2 is not a valid status code for state code dcp_communityboarddispositionState.Active on dcp_communityboarddisposition with Id cb0f8340-970b-ea11-a99d-001dd830809a.
{
"data": {
"id": "cb0f8340-970b-ea11-a99d-001dd830809a",
"attributes": {
"fullname": "",
"dcp-publichearinglocation": "canal",
"dcp-ispublichearingrequired": null,
"dcp-dateofpublichearing": "2019-11-22T00:02:00.000Z",
"dcp-boroughpresidentrecommendation": 717170000,
"dcp-boroughboardrecommendation": null,
"dcp-communityboardrecommendation": null,
"dcp-consideration": "0\n",
"dcp-votelocation": "",
"dcp-datereceived": null,
"dcp-dateofvote": null,
"statuscode": 2,
"statecode": 1,
"dcp-docketdescription": null,
"dcp-votinginfavorrecommendation": null,
"dcp-votingagainstrecommendation": null,
"dcp-votingabstainingonrecommendation": null,
"dcp-totalmembersappointedtotheboard": null,
"dcp-wasaquorumpresent": true
},
"relationships": {
"project": {
"data": {
"type": "projects",
"id": "P2017K0431"
}
},
"assignment": {
"data": {
"type": "assignments",
"id": "15ac2042-970b-ea11-a9aa-001dd8308025"
}
}
},
"type": "dispositions"
}
}
@gopal2020 I can't move forward on this until I can verify what exactly is validated in terms of combinations of values for status and state codes.
Good catch @allthesignals , thanks.
I had indeed already pressed submit twice for this recommendation, like @andycochran mentioned. Just guessing: maybe in this case the state code was modified to reflect an already-submitted disposition?
(The first time the file upload failed for one POST. The second time all POSTs succeeded, but the UI froze and I'm not sure if the recommendation values were successfully PATCHed. )
@godfreyyeung wanna make sure we're talking about the same issue :) this is a different rec issue with the api. the upload issue has already been solved.
I'm not sure why but this seems to have something to do with the previous state of the whole record, and the committed state of the record. I'm able to promote the record to the inactive submitted state: statecode 1, statuscode 2 in a single transaction after changing it to some other valid combination.
I can't reproduce this anymore....
If you able to submit , could you please attached screenshot.
Thanks Gopal
From: Matt Gardner [mailto:notifications@github.com] Sent: Thursday, November 21, 2019 1:44 PM To: NYCPlanning/labs-zap-search labs-zap-search@noreply.github.com Cc: Gopal Das (DCP-Consultant) GDas@planning.nyc.gov; Mention mention@noreply.github.com Subject: Re: [NYCPlanning/labs-zap-search] Stage: User not able to submit Recommendation Information (#973)
I can't reproduce this anymore....
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNYCPlanning%2Flabs-zap-search%2Fissues%2F973%3Femail_source%3Dnotifications%26email_token%3DANU4ZPJMDVH64GJSC5LU5VTQU3JGPA5CNFSM4JQDZUS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE3H2ZI%23issuecomment-557219173&data=02%7C01%7Cgdas%40planning.nyc.gov%7Cbc1c75ddb76b4117a2dc08d76eb2ce2d%7C32f56fc75f814e22a95b15da66513bef%7C0%7C0%7C637099586570006521&sdata=od44ytommUjGHXMbJ9QX6kVQzpa5FLzOxo7PVzdvsKE%3D&reserved=0, or unsubscribehttps://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FANU4ZPMIN5T2EZGDCJD5453QU3JGPANCNFSM4JQDZUSQ&data=02%7C01%7Cgdas%40planning.nyc.gov%7Cbc1c75ddb76b4117a2dc08d76eb2ce2d%7C32f56fc75f814e22a95b15da66513bef%7C0%7C0%7C637099586570016517&sdata=EVyRsXaf0nxEhBOEnMx%2FML4dvoqA6YvRy9be6%2B%2Bj6T8%3D&reserved=0.
I have a hunch that there's something about the dcp_visibility state that is affecting this... a mysterious dispo that was rejecting the 1/2 combo didn't seem to be pulling up in the API. Until I updated it's DCP_Visibility status...
We need to see how these dispositions were created in the first place. When I look up the records for these in the CRM GUI, I'm seeing this:
They don't have associated projects or naming.
I learned you can patch non-existent entity records by making up a valid guid:
I'm putting this aside. @gopal2020 please try to assign new projects to yourself and keep attempting the recommendation.
This is probably a symptom of multiple testers/product owners using the same system and wires being crossed between that system and the ETL. Perhaps the project received non-existent disposition IDs.
This bug is resolved. QA Team please review.
@hannahkates @andycochran
this issue is still not fixed
@gopal2020 might need a little more info: which project assignment is this? participant role?
Matt here:
Error responses:
A validation error occurred. The value of 'dcp_votingagainstrecommendation' on record of type 'dcp_communityboarddisposition' is outside the valid range."
Data:
{"data":{"id":"2eaa871c-3015-ea11-a9bb-001dd8308fb0","attributes":{"fullname":"Komalpreet singh","dcp-publichearinglocation":"abccccccc","dcp-ispublichearingrequired":null,"dcp-representing":"Community Board","dcp-dateofpublichearing":"2019-12-19T06:13:00.000Z","dcp-nameofpersoncompletingthisform":"ZAP LUP Portal","dcp-projectaction":"b90fc6a8-fcf0-e911-a99e-001dd8308076","dcp-boroughpresidentrecommendation":null,"dcp-boroughboardrecommendation":null,"dcp-communityboardrecommendation":717170006,"dcp-consideration":"46464664","dcp-votelocation":"","dcp-datereceived":"2019-12-03T16:54:05.154Z","dcp-dateofvote":null,"statuscode":2,"statecode":1,"dcp-docketdescription":null,"dcp-votinginfavorrecommendation":45646464,"dcp-votingagainstrecommendation":646,"dcp-votingabstainingonrecommendation":646,"dcp-totalmembersappointedtotheboard":2,"dcp-wasaquorumpresent":false},"relationships":{"project":{"data":{"type":"projects","id":"2020K0251"}},"assignment":{"data":{"type":"assignments","id":"CB-01bcdc7d-fcf0-e911-a99e-001dd8308076"}}},"type":"dispositions"}}
This is because the other fields aren't validated. They need to be between 0-99
I think this is fixed now that we implemented correct validation for the 0-99 range. QA team please recheck.
This issue is still now fixed
Project name: 2513-2523 Avenue O Rezoning
Expected Result: User should submit able to submit Recommendation Information
Actual Result: User Not able to submit Recommendation Information