Unee-T-INS / frontend

Meteor front end
https://case.dev.ins.unee-t.com/
GNU Affero General Public License v3.0
0 stars 1 forks source link

Submit error when change dropdown label #20

Closed sonytrinhcvn closed 4 years ago

sonytrinhcvn commented 4 years ago

I just changed the label of dropdown and still keeping KEY but cannot add a new Unit, just got Lamda error.

check this commit

sonytrinhcvn commented 4 years ago

I've just updated the files following the guide here. But still got error, also please see lastest commit.

franck-boullier commented 4 years ago

Fix Step 1 DONE:

We need to make sure that the values in the table ut_role_types in the BZ database are also updated:

Fix 1 did NOT fix the issue.

More information:

Details from the console:

image

BZ Db:

Working as expected:

Issues/unexpected stuff:

Mongo DB:

Working as expected:

Issues/unexpected stuff:

Logs from Cloudwatch:

...
{
    "fields": {
        "app": "processinvitations",
        "commit": "1f48f08",
        "error": "sql: no rows in result set",
        "invite": {
            "_id": "kifEmBZCyhEGJXM8m",
            "caseId": 0,
            "invitedBy": 7,
            "invitee": 7,
            "isOccupant": false,
            "mefeInvitationIdIntValue": 27,
            "role": "My Account Manager",
            "type": "replace_default",
            "unitId": 30
        },
        "plugin": "relay",
        "region": "ap-southeast-1",
        "requestID": "c0648514-ecf5-469c-b0ba-90bebd1c4120",
        "stage": "production",
        "version": "29"
    },
    "level": "error",
    "timestamp": "2020-02-16T04:37:05.121056108Z",
    "message": "failed to run step1Insert"
}
{
...

Learning:

The issue seems to happen when we try to assign the user to the renamed role in the newly created unit.

To Do:

franck-boullier commented 4 years ago

@sonytrinhcvn what is the latest commit for a version that was working as expected (unit is created without the API error)?

franck-boullier commented 4 years ago

The values for the roles in the table ut_role_types were NOT consistent with the data in Mongo DB.

Replace the values for the roles in the table ut_role_types with the values we have in the Mongo DB:

This fixed the issue . We are now able to create a new policy

image