From 614bfc219c795b17db82456bedf01e4a86b4db63 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Mon, 10 Mar 2025 20:19:22 -0400 Subject: [PATCH 1/3] ref: add new fields to data access request form --- physionet-django/project/forms.py | 8 ++++++-- physionet-django/project/modelcomponents/access.py | 2 ++ .../project/data_access_request_status_detail.html | 10 ++++++++++ .../project/data_access_request_table_snippet.html | 4 ++++ .../templates/project/data_access_request_view.html | 10 ++++++++++ 5 files changed, 32 insertions(+), 2 deletions(-) diff --git a/physionet-django/project/forms.py b/physionet-django/project/forms.py index ca37de0ee1..23255eaef3 100644 --- a/physionet-django/project/forms.py +++ b/physionet-django/project/forms.py @@ -1089,14 +1089,18 @@ class Meta: class DataAccessRequestForm(forms.ModelForm): class Meta: model = DataAccessRequest - fields = ('data_use_title', 'data_use_purpose', 'agree_dua') + fields = ('data_use_title', 'data_use_purpose', 'publications_link', 'collaborators', 'agree_dua') help_texts = { 'data_use_title': """Title of the project you would like to use the data for""", 'data_use_purpose': """Detailed description of the data use.""", + 'publications_link': """Link to relevant publications related to this research project""", + 'collaborators': """List of collaborators (Name, email addresses) who will be working with you on this project""", } labels = { 'data_use_title': 'Research Project Title', - 'data_use_purpose': 'Research Project Details' + 'data_use_purpose': 'Research Project Details', + 'publications_link': 'Link to Relevant Publications', + 'collaborators': 'List of Collaborators' } agree_dua = forms.BooleanField(required=True) diff --git a/physionet-django/project/modelcomponents/access.py b/physionet-django/project/modelcomponents/access.py index 82e16b821f..a9e71120bf 100644 --- a/physionet-django/project/modelcomponents/access.py +++ b/physionet-django/project/modelcomponents/access.py @@ -75,6 +75,8 @@ class DataAccessRequest(models.Model): data_use_title = models.CharField(max_length=200, default='') data_use_purpose = SafeHTMLField(blank=False, max_length=10000) + publications_link = models.URLField(blank=True, null=True) + collaborators = models.TextField(blank=True, null=True, help_text="List of collaborators (Name, email addresses)") status = models.PositiveSmallIntegerField(default=0, choices=REJECT_ACCEPT) diff --git a/physionet-django/project/templates/project/data_access_request_status_detail.html b/physionet-django/project/templates/project/data_access_request_status_detail.html index 4eff0321dd..5bda10c5d6 100644 --- a/physionet-django/project/templates/project/data_access_request_status_detail.html +++ b/physionet-django/project/templates/project/data_access_request_status_detail.html @@ -8,5 +8,15 @@

Data Access Request - {{ project }}

{{ access_request.data_use_title }}

submitted on {{ access_request.request_datetime }}{% if access_request.is_accepted %}, valid {% if access_request.valid_until %}until {{ access_request.valid_until }}{% else %}forever {% endif %}{% endif %}{% include 'project/data_access_request_badge.html' with data_access_request=access_request %}

{{ access_request.data_use_purpose|safe }}

+ + {% if access_request.publications_link %} +

Relevant Publications

+

{{ access_request.publications_link }}

+ {% endif %} + + {% if access_request.collaborators %} +

Collaborators

+

{{ access_request.collaborators }}

+ {% endif %} {% endblock %} diff --git a/physionet-django/project/templates/project/data_access_request_table_snippet.html b/physionet-django/project/templates/project/data_access_request_table_snippet.html index f737e0421a..25d646d286 100644 --- a/physionet-django/project/templates/project/data_access_request_table_snippet.html +++ b/physionet-django/project/templates/project/data_access_request_table_snippet.html @@ -10,6 +10,8 @@

Previous Requests

Last status update Title Data Use Purpose + Publications Link + Collaborators Responder Comment @@ -21,6 +23,8 @@

Previous Requests

{{ req.decision_datetime|date }} {{ req.data_use_title }} {{ req.data_use_purpose | safe }} + {% if req.publications_link %}{{ req.publications_link }}{% endif %} + {{ req.collaborators }} {{ req.responder_comments | safe }} {% endfor %} diff --git a/physionet-django/project/templates/project/data_access_request_view.html b/physionet-django/project/templates/project/data_access_request_view.html index 82dcdd9270..f4f0e994ca 100644 --- a/physionet-django/project/templates/project/data_access_request_view.html +++ b/physionet-django/project/templates/project/data_access_request_view.html @@ -87,6 +87,16 @@

Project Description

{{ access_request.data_use_title }}

{{ access_request.data_use_purpose|safe }} + + {% if access_request.publications_link %} +
Relevant Publications
+

{{ access_request.publications_link }}

+ {% endif %} + + {% if access_request.collaborators %} +
Collaborators
+

{{ access_request.collaborators }}

+ {% endif %}

From 9de908b0092ba061de4812d61b6ea0afc2a086a1 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Wed, 12 Mar 2025 10:05:17 -0400 Subject: [PATCH 2/3] add migration for change --- ...ataaccessrequest_collaborators_and_more.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 physionet-django/project/migrations/0079_dataaccessrequest_collaborators_and_more.py diff --git a/physionet-django/project/migrations/0079_dataaccessrequest_collaborators_and_more.py b/physionet-django/project/migrations/0079_dataaccessrequest_collaborators_and_more.py new file mode 100644 index 0000000000..051876aa36 --- /dev/null +++ b/physionet-django/project/migrations/0079_dataaccessrequest_collaborators_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.18 on 2025-03-12 14:02 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('project', '0078_delete_archivedproject'), + ] + + operations = [ + migrations.AddField( + model_name='dataaccessrequest', + name='collaborators', + field=models.TextField(blank=True, help_text='List of collaborators (Name, email addresses)', null=True), + ), + migrations.AddField( + model_name='dataaccessrequest', + name='publications_link', + field=models.URLField(blank=True, null=True), + ), + ] From db71d96d4ccd34aa024358555b7a4807e653ea3b Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Thu, 13 Mar 2025 13:55:52 -0400 Subject: [PATCH 3/3] fix: style too long --- physionet-django/project/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/physionet-django/project/forms.py b/physionet-django/project/forms.py index 23255eaef3..7e16433819 100644 --- a/physionet-django/project/forms.py +++ b/physionet-django/project/forms.py @@ -1094,7 +1094,8 @@ class Meta: 'data_use_title': """Title of the project you would like to use the data for""", 'data_use_purpose': """Detailed description of the data use.""", 'publications_link': """Link to relevant publications related to this research project""", - 'collaborators': """List of collaborators (Name, email addresses) who will be working with you on this project""", + 'collaborators': """List of collaborators (Name, email addresses) who will be working """ + """with you on this project""", } labels = { 'data_use_title': 'Research Project Title',