-
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
Track 'archived' status on ActiveProject model. Ref #2148 #2149
Conversation
25fc5c5
to
58b7f0c
Compare
The archive_datetime column was added in #2149. The migration appeared to be looking for the column, and so this is a retrospective fix to allow the build to proceed.
The archive_datetime column was added in #2149. The migration appeared to be looking for the column, and so this is a retrospective fix to allow the build to proceed.
2b13b63
to
ab6ea84
Compare
The archive_datetime column was added in #2149. The migration appeared to be looking for the column, and so this is a retrospective fix to allow the build to proceed.
ab6ea84
to
a78a1a7
Compare
The archive_datetime column was added in #2149. The migration appeared to be looking for the column, and so this is a retrospective fix to allow the build to proceed.
a78a1a7
to
c371a4d
Compare
@bemoody this is now ready for review. Sorry for the churn! |
c371a4d
to
632eacc
Compare
This does not delete the files when it's expected to (when the author deletes the project without submitting it.) Also note that this makes the content of both deleted and rejected projects permanently visible to authors and editors (if you know the URL.) I'm not sure if that's what you intended. It seems dangerous. |
I have now added the
I have updated the access policy for authors to prevent access to archived projects (using the implementation that you suggested - thanks!). I have not restricted access to editors, because I think it is probably useful for them to be able to review content of archived content. |
This prevents you from creating a new project once you have ten archived proejects. |
…t model. Importing the models in the migration uses the latest version of the model. This is inconsistent with the data in the database at the time of migration.
306ddfe
to
79dacf3
Compare
79dacf3
to
951bed1
Compare
Good catch! I have moved the physionet-build/physionet-django/project/views.py Lines 301 to 302 in bcc014e
I implemented the alternative approach that we discussed (first get keys of all active projects except those with |
@kshalot please could you confirm that deprecating |
@bemoody Karol has confirmed that this change will not cause any issues for Health Data Nexus. Please could you go ahead and merge? |
TThanks for your work on this! Could you please raise an issue or issues about the next steps you mentioned above? |
Thanks Benjamin, will do! |
The
ArchivedProject
stores information about projects that are either deleted (by the creator) or rejected (by an editor). As discussed in #2148, there are some major issues with theArchivedProject
object. I think there is agreement that it should be removed.This pull request moves us towards being able to delete the
ArchivedProject
object, by:archived
status to theActiveProject
objectarchived
status.The change touches a lot of files, so the pull request looks bigger than it is. All we are doing is replacing the references to
ArchivedProject
with references toActiveProject.submission_status=ARCHIVED
.After this pull request is merged,
ArchivedProject
objects will continue to exist in the database, but they will not be visible to users and they cannot be created.Some next steps would be to:
GenericForeignKey
s and never touch them again!There is one bug (that I'm aware of) that this change creates: if a new version of a project is created and then archived, it is not possible to create a new version of that project. I think this is a fairly minor issue, and I would like to address in a later pull request.