-
Notifications
You must be signed in to change notification settings - Fork 20
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
Implement event agreement on event app #1904
base: dev
Are you sure you want to change the base?
Implement event agreement on event app #1904
Conversation
Could you please check the question section of the PR, when you have time? I still have few small changes to make, so i marked this as draft, i will work on them tomorrow. |
a5cb337
to
376944f
Compare
@tompollard @alistairewj , Ready for review. There are few things that might need to be implemented pending your answers to the question on the PR(please check PR description) |
I'm not sure whether you mean to say modifying an agreement, or switching an event to point to a different agreement. The agreement is a fixed object and nobody should ever change it. If changes are needed then we should create a new agreement, and point the event to the new version. It seems unlikely that we would ever want to do this after an event is public. If so, I think we'd want to say that yes, anybody who agreed to the first version of the agreement will now be required to click through the second version.
No. Please write test cases for a new feature along with the new feature.
A single "comprehensive" test case tends to be a lot of work to write and also tends not to exercise all of the functionality. Instead, try to write small and focused test cases. Test a single request at a time if you can. Use fixtures to define the initial state, make a request, and verify that it has the expected effect.
Yes.
No. |
Thank you for the feedback
---> Here i meant to ask mainly about switching. Noted about the expectation that admin's will not edit the existing Agreement. I suppose my question was more of If i understood correctly, your answer was yes let's enforce it, right? |
Event hosts are not necessarily empowered to make decisions about who can access what data under what conditions. Adding temporary database access to an event is something that in general has to be approved by the data contributors, and the data use agreement is (or might be) part of that. So... event agreement should be tied to event dataset, I guess? |
@bemoody I think that makes sense. Currently an Event can have multiple Datasets attached to it. so i am having difficulty wrapping my mind around how to tie the Event Agreement to dataset(s) or that the implementation would probably be the same like what we have now[which is Event has dataset(s), and there will be 1 agreement created for that, and that agreement will have the data use agreement which covers all the dataset(s)] As no matter how many number of dataset we have in the event, we would probably write all the agreement stuff for those dataset under that event in 1 single event agreement. Or was your suggestion, that maybe we shouldn't let event host change the agreement or assign it at all? Maybe Platform Admin or whoever has the permission should be do it. |
48311de
to
b0ed5bd
Compare
I added the tests for signing the event agreement, and updated the model to make event agreement optional. For the part about requiring participants to resign the event agreement, I will open another PR after this one. |
Currently paused while we discuss/figureout how we want to implement access to datasets/project |
This should let us select active Event Agreement during Event Creation or Edit
The Option displayed on the `EventForm` for the field `event_agreement` of model `Event` depends on `__str__` method of `EventAgreement`. Since we can have different version of same `EventAgreement`, it is a good idea to show the `EventAgreement` version to the Event Host. Before the change, if there are 2 Event Agreement with Name "My Event Agreement" but different versions, then the Event Host will see the same name repeated twice which will be confusing. PS: i also checked how DUAs are implemented in project, and i think the expectation there might be that the Administrator will set the old DUAs to inactive. So this commit might be optional if we assume 1. Old version of event Agreement will not be used by Event Host. 2. Platform Administrator will set the old versions of Event Agreement to inactive.
Note: Although we have plans to refactor this method in the future, i had to update it for now because we dont know how we will refactor it later. Since this change is required for participant to access the dataset through events, it should be okay to update it here. The logic will get refactored when we refactor the function.
This change assumes that EventHost dont need to sign the EventAgreement. On this commit, i added a separate if statement to provide access to event host(the alternative was to have the same check in two different if statement with and)
The workflow is that once participants are approved for the Event, they will have to sign the EventAgreement(it doesnot make sense to ask people to sign the agreement if they haven't been accepted to the event as we might end up with people who have signed the event agreement but were rejected from event)
Changes 1. Fix typo Archieved > Archived 2. Add a conditional statement to check if the user has signed the Event Agreement. The block of if elif statement maintains the expect flow i.e users are expected to 1. First request participation 2. once approved, sign the agreement 3. and then get access to the dataset
Event creation/edit test were failing because the event form expects and `event_agreement` field.
fc5c9a0
to
adf7d27
Compare
Added two tests 1. Edits event to switch the event agreement 2. Participant joins an event and sings the agreement
adf7d27
to
9899c28
Compare
Context:
On PR #1876, we added added models
EventAgreement
andEventAgreementSignatures
. The goal of those models is to ultimately let Event Hosts attachEventAgreement
toEvents
, and for the participants to read the event agreements and accept the event agreement before they are able to access the data.This PR implements the Event Agreement on the Event APP for Hosts and Participants. Now Host is able to link and Event Agreement to an Event. The participants will then be required to accept the Event Agreement before they can access the data
Workflow of the feature
Event Agreements
from Admin console, Thanks to allow dua creation for events #1876. These Agreements will then be used by Event HostsEvent Agreements
when creating or editing the event.Questions
Should I open a separate PR for tests? I see on project we have a test that says
TestWorkflow
and tests all the Project stuff from start to finish? If we want to add a test like that, it makes more sense to open a separate PR.Also, I did not see the project having a test for just signing DUA, so thought it might be a good idea to follow the same pattern
Should Event Agreement be optional(when creating/editing event)?
Do we let people unsign an agreement?