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

Cannot remove existing participant consents and surveys #636

Open
elainewolfe opened this issue Feb 2, 2017 · 12 comments
Open

Cannot remove existing participant consents and surveys #636

elainewolfe opened this issue Feb 2, 2017 · 12 comments

Comments

@elainewolfe
Copy link

Clicking on "Remove {participant name}" generates an error message, and does not delete the participant from the account. The participant should be deleted when clicking the remove button, and assigned samples (if any) are automatically unassigned.

@sjanssen2
Copy link
Contributor

I cannot replicate this with an arbitrary kit on my installation of labadmin and american-gut-web repositories :-/

@elainewolfe
Copy link
Author

To elaborate on the issue, if a participant does have samples assigned, clicking on Remove will unassign the barcodes, but will not remove the consent/surveys. This is on the live system.

@sjanssen2
Copy link
Contributor

Our test server is up again, but I cannot reproduce the error there either :-/

@sjanssen2
Copy link
Contributor

Could you please mail ([email protected]) me the affected kitID and the participants that should be removed. Please don't post those infos here, but use email.

@sjanssen2
Copy link
Contributor

Thanks for your mail, it helped since I could now get a more speaking error message:
Error: update or delete on table "ag_consent" violates foreign key constraint "fk_ag_login_surveys0" on table "ag_login_surveys"

@sjanssen2
Copy link
Contributor

@josenavas @antgonza do you guys know if SQL transactions are implemented for american gut web?

@sjanssen2
Copy link
Contributor

I think the problem is that american-gut-web/amgut/lib/data_access deleteAGParticipantSurvey expects to have only one survey for each participant. The one you sent me has two and thus not all entries are correctly removed from the according db tables.

@sjanssen2
Copy link
Contributor

My bugfix has been merged. We are now waiting that someone deploys it to the life system.

@EmbrietteH
Copy link
Contributor

EmbrietteH commented Feb 6, 2017 via email

@josenavas
Copy link
Member

Just updated the test system - please make sure that everything behaves as expected.

@EmbrietteH
Copy link
Contributor

Confirmed that I can remove a participant; however, this does not work if there is a sample already assigned. If a sample is assigned, the participant should be able to click "Remove NAME," which will trigger un-assignment of the sample and removal of the participant.

@EmbrietteH
Copy link
Contributor

@sjanssen2 wanted to check to see progress on this. We can't merge on the live system until the fix works completely as expected (only partially functioning now). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants