biocore / american-gut-web

The website for the American Gut Project participant portal
BSD 3-Clause "New" or "Revised" License
5 stars 24 forks source link

Cannot remove existing participant consents and surveys #636

Open elainewolfe opened 7 years ago

elainewolfe commented 7 years ago

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 commented 7 years ago

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

elainewolfe commented 7 years ago

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 commented 7 years ago

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

sjanssen2 commented 7 years ago

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

sjanssen2 commented 7 years ago

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 commented 7 years ago

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

sjanssen2 commented 7 years ago

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 commented 7 years ago

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

EmbrietteH commented 7 years ago

Thanks Stefan, we'll deploy to the test system first and test it there to make sure nothing weird was introduced, then we'll deploy to the live system. Jose can deploy to test.

Embriette R. Hyde, PhD

Project Manager, American Gut Project Assistant Project Scientist Rob Knight Lab Department of Pediatrics University of California, San Diego Phone: 832-845-7532

On Mon, Feb 6, 2017 at 12:15 PM, Stefan Janssen notifications@github.com wrote:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/biocore/american-gut-web/issues/636#issuecomment-277800062, or mute the thread https://github.com/notifications/unsubscribe-auth/AKwnj4tyqm9fhrtrpiQG33RM_l639oYqks5rZ39ygaJpZM4L1q9_ .

josenavas commented 7 years ago

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

EmbrietteH commented 7 years ago

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 commented 7 years ago

@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!