From 924bfbbd2c6e3c67f2cc44f8484fb6f457e08bfd Mon Sep 17 00:00:00 2001 From: Aga Date: Fri, 16 Jun 2023 12:09:13 +0100 Subject: [PATCH 01/23] new edges branch --- portality/static/vendor/edges | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portality/static/vendor/edges b/portality/static/vendor/edges index 7350e42008..42ebaf6f3c 160000 --- a/portality/static/vendor/edges +++ b/portality/static/vendor/edges @@ -1 +1 @@ -Subproject commit 7350e420087f89364e71b4431e3a3130d4d00c69 +Subproject commit 42ebaf6f3cc59ba0dfb6f288bdab786d2025fe5d From 25ca6f07d4a2d97bfb33f43f86776dd5c9aaf679 Mon Sep 17 00:00:00 2001 From: Aga Date: Wed, 21 Jun 2023 12:16:47 +0100 Subject: [PATCH 02/23] add index to terms filter --- portality/static/js/doaj.fieldrender.edges.js | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/portality/static/js/doaj.fieldrender.edges.js b/portality/static/js/doaj.fieldrender.edges.js index 01f5589f2f..648957bda9 100644 --- a/portality/static/js/doaj.fieldrender.edges.js +++ b/portality/static/js/doaj.fieldrender.edges.js @@ -2277,7 +2277,7 @@ $.extend(true, doaj, { // the remove block looks different, depending on the kind of filter to remove if (def.filter === "term" || def.filter === "terms") { - filters += ''; + filters += ''; filters += def.display + valDisplay; filters += ' '; filters += ""; @@ -2332,6 +2332,7 @@ $.extend(true, doaj, { this.removeFilter = function (element) { var el = this.component.jq(element); + var sf = this.component; // if this is a compound filter, remove it by id var compound = el.attr("data-compound"); @@ -2347,20 +2348,10 @@ $.extend(true, doaj, { var value = false; if (ft === "terms" || ft === "term") { - val = el.attr("data-value"); - // translate string value to a type required by a model - if (val === "true"){ - value = true; - } - else if (val === "false"){ - value = false; - } - else if (!isNaN(parseInt(val))){ - value = parseInt(val); - } - else { - value = val; - } + // value = el.attr("data-value"); + values = sf.mustFilters[field].values; + idx = el.attr("data-value-idx") + value = values[idx].val } else if (ft === "range") { value = {}; From 9318242bfbf73c974b5bd4892812343cd8a51494 Mon Sep 17 00:00:00 2001 From: Aga Date: Wed, 21 Jun 2023 13:26:28 +0100 Subject: [PATCH 03/23] move applicants name and email to the sticky side panel --- portality/templates/application_form/editorial_form_body.html | 1 - portality/templates/application_form/editorial_side_panel.html | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/portality/templates/application_form/editorial_form_body.html b/portality/templates/application_form/editorial_form_body.html index 7912037689..53be1f5437 100644 --- a/portality/templates/application_form/editorial_form_body.html +++ b/portality/templates/application_form/editorial_form_body.html @@ -1,6 +1,5 @@ {% include "application_form/_edit_status.html" %} {% include "application_form/_backend_validation.html" %} -{% include "application_form/_contact.html" %} {% import "application_form/_application_warning_msg.html" as _msg %} {{ _msg.build_journal_withdrawn_deleted_msg(obj) }} diff --git a/portality/templates/application_form/editorial_side_panel.html b/portality/templates/application_form/editorial_side_panel.html index cde46632fc..b7a86f5ef1 100644 --- a/portality/templates/application_form/editorial_side_panel.html +++ b/portality/templates/application_form/editorial_side_panel.html @@ -17,6 +17,7 @@

LOCKED FOR EDITING UNTIL +{% include "application_form/_contact.html" %}
{% set fs = formulaic_context.fieldset("notes") %} From 83011470912deb59ef43d16d74047700a9d5b47c Mon Sep 17 00:00:00 2001 From: Aga Date: Thu, 22 Jun 2023 12:20:27 +0100 Subject: [PATCH 04/23] add info about issns to all notifications but the bg one --- cms/data/notifications.yml | 32 +++++++++---------- .../application_assed_assigned_notify.py | 4 ++- .../application_assed_inprogress_notify.py | 4 ++- .../application_editor_completed_notify.py | 4 ++- ...pplication_editor_group_assigned_notify.py | 4 ++- .../application_editor_inprogress_notify.py | 4 ++- .../application_maned_ready_notify.py | 4 ++- .../application_publisher_accepted_notify.py | 4 ++- .../application_publisher_assigned_notify.py | 4 ++- .../application_publisher_created_notify.py | 4 ++- ...application_publisher_inprogress_notify.py | 4 ++- ...pplication_publisher_quickreject_notify.py | 4 ++- .../application_publisher_revision_notify.py | 4 ++- .../journal_assed_assigned_notify.py | 4 ++- .../journal_editor_group_assigned_notify.py | 4 ++- ...pdate_request_publisher_accepted_notify.py | 4 ++- ...pdate_request_publisher_assigned_notify.py | 4 ++- ...pdate_request_publisher_rejected_notify.py | 4 ++- 18 files changed, 67 insertions(+), 33 deletions(-) diff --git a/cms/data/notifications.yml b/cms/data/notifications.yml index 6aca840e49..e7b99b43a5 100644 --- a/cms/data/notifications.yml +++ b/cms/data/notifications.yml @@ -9,32 +9,32 @@ application:assed:inprogress:notify: long: | The application for **{application_title}** has not passed review by an Editor or Managing Editor and has been assigned back to you with questions or changes. short: - One of your applications has not passed review + One of your applications has not passed review ( **{issns}** ) application:editor:completed:notify: long: | **{associate_editor}** has finished a review of the application for **{application_title}** and marked it as **Completed**. Please review within 5 working days. short: - Application marked as completed + Application marked as completed ( **{issns}** ) application:editor_group:assigned:notify: long: | A new application or an update request for the journal **{journal_name}** has been assigned to your group by a Managing Editor. Please assign this to an Associate Editor within 5 working days. short: - New application assigned to your group + New application assigned to your group ( **{issns}** ) application:editor:inprogress:notify: long: | The application for **{application_title}** has not passed review by a Managing Editor and has been assigned back to your group with questions or changes. short: - Application reverted to 'In Progress' by Managing Editor + Application reverted to 'In Progress' by Managing Editor ( **{issns}** ) application:maned:ready:notify: long: | The application for **{application_title}** has been marked **Ready** by **{editor}**. Please review it as soon as possible. short: - Application marked as ready + Application marked as ready ( **{issns}** ) application:publisher:accepted:notify: long: | @@ -52,13 +52,13 @@ application:publisher:accepted:notify: We are delighted to welcome this journal into DOAJ. Do not hesitate to contact us at [helpdesk@doaj.org](mailto:helpdesk@doaj.org) if you have any questions. short: - Your journal has been accepted + Your journal has been accepted ( **{issns}** ) application:publisher:assigned:notify: long: | Your application for **{application_title}** submitted on {application_date} has been assigned to an editor for review for inclusion in the DOAJ. Please look out for further communications about the application. These may come from someone who is not using a DOAJ email address: [{volunteers_url}]({volunteers_url}) short: - Your application has been assigned an editor for review + Your application has been assigned an editor for review ( **{issns}** ) application:publisher:created:notify: long: | @@ -72,7 +72,7 @@ application:publisher:created:notify: If you write to us, check first that there is nothing in your Spam folder from us or one of our volunteers. Our volunteers may not be emailing from a DOAJ email address so you can check that their name is there on this page [{volunteers_url}]({volunteers_url}) short: - Your application to DOAJ has been received + Your application to DOAJ has been received ( **{issns}** ) application:publisher:inprogress:notify: long: | @@ -80,7 +80,7 @@ application:publisher:inprogress:notify: The Associate Editor ([{volunteers}]({volunteers})) may contact you by email with questions. They may not be using a doaj.org email address. These emails can end up in your Spam folder so please check your Spam folder regularly. short: - Your submission is under review + Your submission is under review ( **{issns}** ) application:publisher:quickreject:notify: long: | @@ -90,13 +90,13 @@ application:publisher:quickreject:notify: You may submit a new application 6 months after the date of this email unless advised otherwise by a member of the DOAJ Editorial Team. Before you apply again, make any necessary changes to ensure your journal adheres to our criteria: ([{doaj_guide_url}]({doaj_guide_url})) short: - Your application was rejected + Your application was rejected ( **{issns}** ) application:publisher:revision:notify: long: | The update which you submitted for **{application_title}** on {date_applied} requires some revisions before it can be accepted. The Managing Editor reviewing your update will contact you to explain the changes that are needed. short: - Your update request needs revisions + Your update request needs revisions ( **{issns}** ) bg:job_finished:notify: long: | @@ -108,13 +108,13 @@ journal:assed:assigned:notify: long: | The journal **{journal_name}** has been assigned to you by the Editor of your group **{group_name}**. Please start work on this within 10 days. short: - New journal assigned to you + New journal assigned to you ( **{issns}** ) journal:editor_group:assigned:notify: long: | The journal **{journal_name}** has been assigned to your group by a Managing Editor. Please assign this to an Associate Editor within 5 working days. short: - New journal assigned to your group + New journal assigned to your group ( **{issns}** ) update_request:publisher:accepted:notify: long: | @@ -122,7 +122,7 @@ update_request:publisher:accepted:notify: Thank you for updating this journal and helping to keep the DOAJ database up-to-date. short: - Update request accepted + Update request accepted ( **{issns}** ) update_request:publisher:assigned:notify: long: | @@ -130,7 +130,7 @@ update_request:publisher:assigned:notify: Thank you for helping to keep the DOAJ database up-to-date. short: - Your update request has been assigned an editor for review + Your update request has been assigned an editor for review ( **{issns}** ) update_request:publisher:rejected:notify: long: | @@ -140,5 +140,5 @@ update_request:publisher:rejected:notify: - We already have one active update in the system. Additional updates are rejected without review. short: - Your update request was rejected + Your update request was rejected ( **{issns}** ) diff --git a/portality/events/consumers/application_assed_assigned_notify.py b/portality/events/consumers/application_assed_assigned_notify.py index 54b5c72c9b..6643d975e5 100644 --- a/portality/events/consumers/application_assed_assigned_notify.py +++ b/portality/events/consumers/application_assed_assigned_notify.py @@ -38,7 +38,9 @@ def consume(cls, event): journal_title=application.bibjson().title, group_name=application.editor_group ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) notification.action = url_for("editor.application", application_id=application.id) svc.notify(notification) diff --git a/portality/events/consumers/application_assed_inprogress_notify.py b/portality/events/consumers/application_assed_inprogress_notify.py index 060b1d0034..bdd06145d3 100644 --- a/portality/events/consumers/application_assed_inprogress_notify.py +++ b/portality/events/consumers/application_assed_inprogress_notify.py @@ -36,7 +36,9 @@ def consume(cls, event): notification.created_by = cls.ID notification.classification = constants.NOTIFICATION_CLASSIFICATION_STATUS_CHANGE notification.long = svc.long_notification(cls.ID).format(application_title=application.bibjson().title) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) notification.action = url_for("editor.application", application_id=application.id) svc.notify(notification) diff --git a/portality/events/consumers/application_editor_completed_notify.py b/portality/events/consumers/application_editor_completed_notify.py index 23c42b87c3..53cbef8c6b 100644 --- a/portality/events/consumers/application_editor_completed_notify.py +++ b/portality/events/consumers/application_editor_completed_notify.py @@ -58,7 +58,9 @@ def consume(cls, event): application_title=application.bibjson().title, associate_editor=associate_editor ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) notification.action = url_for("editor.application", application_id=application.id) svc.notify(notification) diff --git a/portality/events/consumers/application_editor_group_assigned_notify.py b/portality/events/consumers/application_editor_group_assigned_notify.py index e496337c13..6a20e2be77 100644 --- a/portality/events/consumers/application_editor_group_assigned_notify.py +++ b/portality/events/consumers/application_editor_group_assigned_notify.py @@ -43,7 +43,9 @@ def consume(cls, event): notification.long = svc.long_notification(cls.ID).format( journal_name=application.bibjson().title ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) notification.action = url_for("editor.application", application_id=application.id) diff --git a/portality/events/consumers/application_editor_inprogress_notify.py b/portality/events/consumers/application_editor_inprogress_notify.py index 1fdbe029d8..f5bcd73182 100644 --- a/portality/events/consumers/application_editor_inprogress_notify.py +++ b/portality/events/consumers/application_editor_inprogress_notify.py @@ -53,7 +53,9 @@ def consume(cls, event): notification.long = svc.long_notification(cls.ID).format( application_title=application.bibjson().title ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) notification.action = url_for("editor.application", application_id=application.id) svc.notify(notification) diff --git a/portality/events/consumers/application_maned_ready_notify.py b/portality/events/consumers/application_maned_ready_notify.py index 798f204627..84c4268523 100644 --- a/portality/events/consumers/application_maned_ready_notify.py +++ b/portality/events/consumers/application_maned_ready_notify.py @@ -49,7 +49,9 @@ def consume(cls, event): application_title=application.bibjson().title, editor=editor ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) notification.action = url_for("admin.application", application_id=application.id) svc.notify(notification) diff --git a/portality/events/consumers/application_publisher_accepted_notify.py b/portality/events/consumers/application_publisher_accepted_notify.py index bf6ecca6f9..9462e50d0a 100644 --- a/portality/events/consumers/application_publisher_accepted_notify.py +++ b/portality/events/consumers/application_publisher_accepted_notify.py @@ -67,7 +67,9 @@ def consume(cls, event): publisher_dashboard_url=app.config.get("BASE_URL") + url_for("publisher.journals"), faq_url=app.config.get("BASE_URL") + url_for("doaj.faq") ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) notification.action = url_for("publisher.journals") diff --git a/portality/events/consumers/application_publisher_assigned_notify.py b/portality/events/consumers/application_publisher_assigned_notify.py index 22acf66d02..56aa16f109 100644 --- a/portality/events/consumers/application_publisher_assigned_notify.py +++ b/portality/events/consumers/application_publisher_assigned_notify.py @@ -64,7 +64,9 @@ def consume(cls, event): application_date=dates.human_date(application.date_applied), volunteers_url=app.config.get('BASE_URL', "https://doaj.org") + url_for("doaj.volunteers"), ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) # note that there is no action url svc.notify(notification) diff --git a/portality/events/consumers/application_publisher_created_notify.py b/portality/events/consumers/application_publisher_created_notify.py index 743b67cbf4..19b1ad7109 100644 --- a/portality/events/consumers/application_publisher_created_notify.py +++ b/portality/events/consumers/application_publisher_created_notify.py @@ -41,6 +41,8 @@ def consume(cls, event): journal_url=application.bibjson().journal_url, application_date=dates.human_date(application.date_applied), volunteers_url=url_for("doaj.volunteers")) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) svc.notify(notification) diff --git a/portality/events/consumers/application_publisher_inprogress_notify.py b/portality/events/consumers/application_publisher_inprogress_notify.py index f6391f96f5..c8fb9340f2 100644 --- a/portality/events/consumers/application_publisher_inprogress_notify.py +++ b/portality/events/consumers/application_publisher_inprogress_notify.py @@ -46,6 +46,8 @@ def consume(cls, event): date_applied=date_applied, volunteers=volunteers ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) svc.notify(notification) diff --git a/portality/events/consumers/application_publisher_quickreject_notify.py b/portality/events/consumers/application_publisher_quickreject_notify.py index 0548b6d581..55ab95dd34 100644 --- a/portality/events/consumers/application_publisher_quickreject_notify.py +++ b/portality/events/consumers/application_publisher_quickreject_notify.py @@ -51,7 +51,9 @@ def consume(cls, event): note=note if note is not None else "", doaj_guide_url=app.config.get('BASE_URL', "https://doaj.org") + url_for("doaj.guide") ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) # there is no action url for this notification diff --git a/portality/events/consumers/application_publisher_revision_notify.py b/portality/events/consumers/application_publisher_revision_notify.py index d710fcb96d..4c23eae9c3 100644 --- a/portality/events/consumers/application_publisher_revision_notify.py +++ b/portality/events/consumers/application_publisher_revision_notify.py @@ -43,6 +43,8 @@ def consume(cls, event): application_title=application.bibjson().title, date_applied=date_applied ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) svc.notify(notification) diff --git a/portality/events/consumers/journal_assed_assigned_notify.py b/portality/events/consumers/journal_assed_assigned_notify.py index 00d76a39ba..fb79cc7560 100644 --- a/portality/events/consumers/journal_assed_assigned_notify.py +++ b/portality/events/consumers/journal_assed_assigned_notify.py @@ -39,7 +39,9 @@ def consume(cls, event): journal_name=journal.bibjson().title, group_name=journal.editor_group ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in journal.bibjson().issns) + ) notification.action = url_for("editor.journal_page", journal_id=journal.id) svc.notify(notification) diff --git a/portality/events/consumers/journal_editor_group_assigned_notify.py b/portality/events/consumers/journal_editor_group_assigned_notify.py index ac696375f4..01c4c63406 100644 --- a/portality/events/consumers/journal_editor_group_assigned_notify.py +++ b/portality/events/consumers/journal_editor_group_assigned_notify.py @@ -44,7 +44,9 @@ def consume(cls, event): notification.long = svc.long_notification(cls.ID).format( journal_name=journal.bibjson().title ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in journal.bibjson().issns) + ) notification.action = url_for("editor.journal_page", journal_id=journal.id) svc.notify(notification) diff --git a/portality/events/consumers/update_request_publisher_accepted_notify.py b/portality/events/consumers/update_request_publisher_accepted_notify.py index d9cd05d102..244ad38270 100644 --- a/portality/events/consumers/update_request_publisher_accepted_notify.py +++ b/portality/events/consumers/update_request_publisher_accepted_notify.py @@ -67,7 +67,9 @@ def consume(cls, event): application_date=dates.human_date(application.date_applied), publisher_dashboard_url=app.config.get('BASE_URL', "https://doaj.org") + url_for("publisher.journals") ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) notification.action = url_for("publisher.journals") diff --git a/portality/events/consumers/update_request_publisher_assigned_notify.py b/portality/events/consumers/update_request_publisher_assigned_notify.py index 7d47eb3002..753a670177 100644 --- a/portality/events/consumers/update_request_publisher_assigned_notify.py +++ b/portality/events/consumers/update_request_publisher_assigned_notify.py @@ -62,7 +62,9 @@ def consume(cls, event): application_title=application.bibjson().title, application_date=dates.human_date(application.date_applied) ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) # note that there is no action url svc.notify(notification) diff --git a/portality/events/consumers/update_request_publisher_rejected_notify.py b/portality/events/consumers/update_request_publisher_rejected_notify.py index 6db89fc39b..ec838e6c44 100644 --- a/portality/events/consumers/update_request_publisher_rejected_notify.py +++ b/portality/events/consumers/update_request_publisher_rejected_notify.py @@ -65,7 +65,9 @@ def consume(cls, event): title=application.bibjson().title, date_applied=date_applied, ) - notification.short = svc.short_notification(cls.ID) + notification.short = svc.short_notification(cls.ID).format( + issns=", ".join(issn for issn in application.bibjson().issns) + ) # there is no action url associated with this notification From 8342754621f7fda7fc84ba75ae1a2550a521fdd4 Mon Sep 17 00:00:00 2001 From: Aga Date: Thu, 22 Jun 2023 12:54:43 +0100 Subject: [PATCH 05/23] errors and format of notifications title --- cms/data/notifications.yml | 34 +++++++++---------- .../application_assed_assigned_notify.py | 2 +- .../application_assed_inprogress_notify.py | 2 +- .../application_editor_completed_notify.py | 2 +- ...pplication_editor_group_assigned_notify.py | 2 +- .../application_editor_inprogress_notify.py | 2 +- .../application_maned_ready_notify.py | 2 +- .../application_publisher_accepted_notify.py | 2 +- .../application_publisher_assigned_notify.py | 2 +- .../application_publisher_created_notify.py | 2 +- ...application_publisher_inprogress_notify.py | 2 +- ...pplication_publisher_quickreject_notify.py | 2 +- .../application_publisher_revision_notify.py | 2 +- .../journal_assed_assigned_notify.py | 2 +- .../journal_editor_group_assigned_notify.py | 2 +- ...pdate_request_publisher_accepted_notify.py | 2 +- ...pdate_request_publisher_assigned_notify.py | 2 +- ...pdate_request_publisher_rejected_notify.py | 2 +- 18 files changed, 34 insertions(+), 34 deletions(-) diff --git a/cms/data/notifications.yml b/cms/data/notifications.yml index e7b99b43a5..23dd1cf47a 100644 --- a/cms/data/notifications.yml +++ b/cms/data/notifications.yml @@ -3,38 +3,38 @@ application:assed:assigned:notify: long: | An application, or update request for the journal **{journal_title}** has been assigned to you by the Editor of your group **{group_name}**. Please start work on this within 10 days. short: - New application assigned to you + New application assigned to you ({issns}) application:assed:inprogress:notify: long: | The application for **{application_title}** has not passed review by an Editor or Managing Editor and has been assigned back to you with questions or changes. short: - One of your applications has not passed review ( **{issns}** ) + One of your applications has not passed review ({issns}) application:editor:completed:notify: long: | **{associate_editor}** has finished a review of the application for **{application_title}** and marked it as **Completed**. Please review within 5 working days. short: - Application marked as completed ( **{issns}** ) + Application marked as completed ({issns}) application:editor_group:assigned:notify: long: | A new application or an update request for the journal **{journal_name}** has been assigned to your group by a Managing Editor. Please assign this to an Associate Editor within 5 working days. short: - New application assigned to your group ( **{issns}** ) + New application assigned to your group ({issns}) application:editor:inprogress:notify: long: | The application for **{application_title}** has not passed review by a Managing Editor and has been assigned back to your group with questions or changes. short: - Application reverted to 'In Progress' by Managing Editor ( **{issns}** ) + Application reverted to 'In Progress' by Managing Editor ({issns}) application:maned:ready:notify: long: | The application for **{application_title}** has been marked **Ready** by **{editor}**. Please review it as soon as possible. short: - Application marked as ready ( **{issns}** ) + Application marked as ready ({issns}) application:publisher:accepted:notify: long: | @@ -52,13 +52,13 @@ application:publisher:accepted:notify: We are delighted to welcome this journal into DOAJ. Do not hesitate to contact us at [helpdesk@doaj.org](mailto:helpdesk@doaj.org) if you have any questions. short: - Your journal has been accepted ( **{issns}** ) + Your journal has been accepted ({issns}) application:publisher:assigned:notify: long: | Your application for **{application_title}** submitted on {application_date} has been assigned to an editor for review for inclusion in the DOAJ. Please look out for further communications about the application. These may come from someone who is not using a DOAJ email address: [{volunteers_url}]({volunteers_url}) short: - Your application has been assigned an editor for review ( **{issns}** ) + Your application has been assigned an editor for review ({issns}) application:publisher:created:notify: long: | @@ -72,7 +72,7 @@ application:publisher:created:notify: If you write to us, check first that there is nothing in your Spam folder from us or one of our volunteers. Our volunteers may not be emailing from a DOAJ email address so you can check that their name is there on this page [{volunteers_url}]({volunteers_url}) short: - Your application to DOAJ has been received ( **{issns}** ) + Your application to DOAJ has been received ({issns}) application:publisher:inprogress:notify: long: | @@ -80,7 +80,7 @@ application:publisher:inprogress:notify: The Associate Editor ([{volunteers}]({volunteers})) may contact you by email with questions. They may not be using a doaj.org email address. These emails can end up in your Spam folder so please check your Spam folder regularly. short: - Your submission is under review ( **{issns}** ) + Your submission is under review ({issns}) application:publisher:quickreject:notify: long: | @@ -90,13 +90,13 @@ application:publisher:quickreject:notify: You may submit a new application 6 months after the date of this email unless advised otherwise by a member of the DOAJ Editorial Team. Before you apply again, make any necessary changes to ensure your journal adheres to our criteria: ([{doaj_guide_url}]({doaj_guide_url})) short: - Your application was rejected ( **{issns}** ) + Your application was rejected ({issns}) application:publisher:revision:notify: long: | The update which you submitted for **{application_title}** on {date_applied} requires some revisions before it can be accepted. The Managing Editor reviewing your update will contact you to explain the changes that are needed. short: - Your update request needs revisions ( **{issns}** ) + Your update request needs revisions ({issns}) bg:job_finished:notify: long: | @@ -108,13 +108,13 @@ journal:assed:assigned:notify: long: | The journal **{journal_name}** has been assigned to you by the Editor of your group **{group_name}**. Please start work on this within 10 days. short: - New journal assigned to you ( **{issns}** ) + New journal assigned to you ({issns}) journal:editor_group:assigned:notify: long: | The journal **{journal_name}** has been assigned to your group by a Managing Editor. Please assign this to an Associate Editor within 5 working days. short: - New journal assigned to your group ( **{issns}** ) + New journal assigned to your group ({issns}) update_request:publisher:accepted:notify: long: | @@ -122,7 +122,7 @@ update_request:publisher:accepted:notify: Thank you for updating this journal and helping to keep the DOAJ database up-to-date. short: - Update request accepted ( **{issns}** ) + Update request accepted ({issns}) update_request:publisher:assigned:notify: long: | @@ -130,7 +130,7 @@ update_request:publisher:assigned:notify: Thank you for helping to keep the DOAJ database up-to-date. short: - Your update request has been assigned an editor for review ( **{issns}** ) + Your update request has been assigned an editor for review ({issns}) update_request:publisher:rejected:notify: long: | @@ -140,5 +140,5 @@ update_request:publisher:rejected:notify: - We already have one active update in the system. Additional updates are rejected without review. short: - Your update request was rejected ( **{issns}** ) + Your update request was rejected ({issns}) diff --git a/portality/events/consumers/application_assed_assigned_notify.py b/portality/events/consumers/application_assed_assigned_notify.py index 6643d975e5..954a359832 100644 --- a/portality/events/consumers/application_assed_assigned_notify.py +++ b/portality/events/consumers/application_assed_assigned_notify.py @@ -39,7 +39,7 @@ def consume(cls, event): group_name=application.editor_group ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) notification.action = url_for("editor.application", application_id=application.id) diff --git a/portality/events/consumers/application_assed_inprogress_notify.py b/portality/events/consumers/application_assed_inprogress_notify.py index bdd06145d3..652dc60f77 100644 --- a/portality/events/consumers/application_assed_inprogress_notify.py +++ b/portality/events/consumers/application_assed_inprogress_notify.py @@ -37,7 +37,7 @@ def consume(cls, event): notification.classification = constants.NOTIFICATION_CLASSIFICATION_STATUS_CHANGE notification.long = svc.long_notification(cls.ID).format(application_title=application.bibjson().title) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) notification.action = url_for("editor.application", application_id=application.id) diff --git a/portality/events/consumers/application_editor_completed_notify.py b/portality/events/consumers/application_editor_completed_notify.py index 53cbef8c6b..cd90c8bb51 100644 --- a/portality/events/consumers/application_editor_completed_notify.py +++ b/portality/events/consumers/application_editor_completed_notify.py @@ -59,7 +59,7 @@ def consume(cls, event): associate_editor=associate_editor ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) notification.action = url_for("editor.application", application_id=application.id) diff --git a/portality/events/consumers/application_editor_group_assigned_notify.py b/portality/events/consumers/application_editor_group_assigned_notify.py index 6a20e2be77..22b277d283 100644 --- a/portality/events/consumers/application_editor_group_assigned_notify.py +++ b/portality/events/consumers/application_editor_group_assigned_notify.py @@ -44,7 +44,7 @@ def consume(cls, event): journal_name=application.bibjson().title ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) notification.action = url_for("editor.application", application_id=application.id) diff --git a/portality/events/consumers/application_editor_inprogress_notify.py b/portality/events/consumers/application_editor_inprogress_notify.py index f5bcd73182..0c929e3631 100644 --- a/portality/events/consumers/application_editor_inprogress_notify.py +++ b/portality/events/consumers/application_editor_inprogress_notify.py @@ -54,7 +54,7 @@ def consume(cls, event): application_title=application.bibjson().title ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) notification.action = url_for("editor.application", application_id=application.id) diff --git a/portality/events/consumers/application_maned_ready_notify.py b/portality/events/consumers/application_maned_ready_notify.py index 84c4268523..58b22384b8 100644 --- a/portality/events/consumers/application_maned_ready_notify.py +++ b/portality/events/consumers/application_maned_ready_notify.py @@ -50,7 +50,7 @@ def consume(cls, event): editor=editor ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) notification.action = url_for("admin.application", application_id=application.id) diff --git a/portality/events/consumers/application_publisher_accepted_notify.py b/portality/events/consumers/application_publisher_accepted_notify.py index 9462e50d0a..9bd34769c2 100644 --- a/portality/events/consumers/application_publisher_accepted_notify.py +++ b/portality/events/consumers/application_publisher_accepted_notify.py @@ -68,7 +68,7 @@ def consume(cls, event): faq_url=app.config.get("BASE_URL") + url_for("doaj.faq") ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) notification.action = url_for("publisher.journals") diff --git a/portality/events/consumers/application_publisher_assigned_notify.py b/portality/events/consumers/application_publisher_assigned_notify.py index 56aa16f109..2349dca60c 100644 --- a/portality/events/consumers/application_publisher_assigned_notify.py +++ b/portality/events/consumers/application_publisher_assigned_notify.py @@ -65,7 +65,7 @@ def consume(cls, event): volunteers_url=app.config.get('BASE_URL', "https://doaj.org") + url_for("doaj.volunteers"), ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) # note that there is no action url diff --git a/portality/events/consumers/application_publisher_created_notify.py b/portality/events/consumers/application_publisher_created_notify.py index 19b1ad7109..14640a18e0 100644 --- a/portality/events/consumers/application_publisher_created_notify.py +++ b/portality/events/consumers/application_publisher_created_notify.py @@ -42,7 +42,7 @@ def consume(cls, event): application_date=dates.human_date(application.date_applied), volunteers_url=url_for("doaj.volunteers")) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) svc.notify(notification) diff --git a/portality/events/consumers/application_publisher_inprogress_notify.py b/portality/events/consumers/application_publisher_inprogress_notify.py index c8fb9340f2..659d5d31c2 100644 --- a/portality/events/consumers/application_publisher_inprogress_notify.py +++ b/portality/events/consumers/application_publisher_inprogress_notify.py @@ -47,7 +47,7 @@ def consume(cls, event): volunteers=volunteers ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) svc.notify(notification) diff --git a/portality/events/consumers/application_publisher_quickreject_notify.py b/portality/events/consumers/application_publisher_quickreject_notify.py index 55ab95dd34..7608d18cbf 100644 --- a/portality/events/consumers/application_publisher_quickreject_notify.py +++ b/portality/events/consumers/application_publisher_quickreject_notify.py @@ -52,7 +52,7 @@ def consume(cls, event): doaj_guide_url=app.config.get('BASE_URL', "https://doaj.org") + url_for("doaj.guide") ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) # there is no action url for this notification diff --git a/portality/events/consumers/application_publisher_revision_notify.py b/portality/events/consumers/application_publisher_revision_notify.py index 4c23eae9c3..143e0c2ccb 100644 --- a/portality/events/consumers/application_publisher_revision_notify.py +++ b/portality/events/consumers/application_publisher_revision_notify.py @@ -44,7 +44,7 @@ def consume(cls, event): date_applied=date_applied ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) svc.notify(notification) diff --git a/portality/events/consumers/journal_assed_assigned_notify.py b/portality/events/consumers/journal_assed_assigned_notify.py index fb79cc7560..c57d3d07d0 100644 --- a/portality/events/consumers/journal_assed_assigned_notify.py +++ b/portality/events/consumers/journal_assed_assigned_notify.py @@ -40,7 +40,7 @@ def consume(cls, event): group_name=journal.editor_group ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in journal.bibjson().issns) + issns=", ".join(issn for issn in journal.bibjson().issns()) ) notification.action = url_for("editor.journal_page", journal_id=journal.id) diff --git a/portality/events/consumers/journal_editor_group_assigned_notify.py b/portality/events/consumers/journal_editor_group_assigned_notify.py index 01c4c63406..217a404b80 100644 --- a/portality/events/consumers/journal_editor_group_assigned_notify.py +++ b/portality/events/consumers/journal_editor_group_assigned_notify.py @@ -45,7 +45,7 @@ def consume(cls, event): journal_name=journal.bibjson().title ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in journal.bibjson().issns) + issns=", ".join(issn for issn in journal.bibjson().issns()) ) notification.action = url_for("editor.journal_page", journal_id=journal.id) diff --git a/portality/events/consumers/update_request_publisher_accepted_notify.py b/portality/events/consumers/update_request_publisher_accepted_notify.py index 244ad38270..3484617232 100644 --- a/portality/events/consumers/update_request_publisher_accepted_notify.py +++ b/portality/events/consumers/update_request_publisher_accepted_notify.py @@ -68,7 +68,7 @@ def consume(cls, event): publisher_dashboard_url=app.config.get('BASE_URL', "https://doaj.org") + url_for("publisher.journals") ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) notification.action = url_for("publisher.journals") diff --git a/portality/events/consumers/update_request_publisher_assigned_notify.py b/portality/events/consumers/update_request_publisher_assigned_notify.py index 753a670177..63254fbbc2 100644 --- a/portality/events/consumers/update_request_publisher_assigned_notify.py +++ b/portality/events/consumers/update_request_publisher_assigned_notify.py @@ -63,7 +63,7 @@ def consume(cls, event): application_date=dates.human_date(application.date_applied) ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) # note that there is no action url diff --git a/portality/events/consumers/update_request_publisher_rejected_notify.py b/portality/events/consumers/update_request_publisher_rejected_notify.py index ec838e6c44..8885891a96 100644 --- a/portality/events/consumers/update_request_publisher_rejected_notify.py +++ b/portality/events/consumers/update_request_publisher_rejected_notify.py @@ -66,7 +66,7 @@ def consume(cls, event): date_applied=date_applied, ) notification.short = svc.short_notification(cls.ID).format( - issns=", ".join(issn for issn in application.bibjson().issns) + issns=", ".join(issn for issn in application.bibjson().issns()) ) # there is no action url associated with this notification From 12bc35fb3c5d581cf21903886f9f2ef9757f4889 Mon Sep 17 00:00:00 2001 From: Aga Date: Wed, 28 Jun 2023 12:58:50 +0100 Subject: [PATCH 06/23] selected filters rendeder value fix --- portality/static/vendor/edges | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portality/static/vendor/edges b/portality/static/vendor/edges index 42ebaf6f3c..990f422016 160000 --- a/portality/static/vendor/edges +++ b/portality/static/vendor/edges @@ -1 +1 @@ -Subproject commit 42ebaf6f3cc59ba0dfb6f288bdab786d2025fe5d +Subproject commit 990f4220163a3e18880f0bdc3ad5c80d234d22dd From 4973e09e4ceaa2d69ec9d6a49c882d2e7a9fb0f8 Mon Sep 17 00:00:00 2001 From: Aga Date: Thu, 29 Jun 2023 12:26:46 +0100 Subject: [PATCH 07/23] fix maned review emails test --- .../test_application_processor_emails.py | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/doajtest/unit/application_processors/test_application_processor_emails.py b/doajtest/unit/application_processors/test_application_processor_emails.py index 44630b518c..aeaa1a1395 100644 --- a/doajtest/unit/application_processors/test_application_processor_emails.py +++ b/doajtest/unit/application_processors/test_application_processor_emails.py @@ -120,7 +120,7 @@ def test_01_public_application_email(self): # * to the applicant, informing them the application was received public_template = re.escape('notification_email.jinja2') public_to = re.escape(account.email) - public_subject = "Directory of Open Access Journals - Your application to DOAJ has been received" + public_subject = re.escape("Directory of Open Access Journals - Your application to DOAJ has been received (" + ", ".join(issn for issn in processor.source.bibjson().issns()) + ")") public_email_matched = re.search(email_log_regex % (public_template, public_to, public_subject), info_stream_contents, re.DOTALL) @@ -220,7 +220,7 @@ def test_01_maned_review_emails(self): editor_template = re.escape('notification_email.jinja2') editor_to = re.escape('eddie@example.com') - editor_subject = "Application reverted to 'In Progress' by Managing Editor" + editor_subject = re.escape("Application reverted to 'In Progress' by Managing Editor (" + ", ".join(issn for issn in processor.source.bibjson().issns()) + ")\n") editor_email_matched = re.search(email_log_regex % (editor_template, editor_to, editor_subject), info_stream_contents, re.DOTALL) @@ -236,7 +236,7 @@ def test_01_maned_review_emails(self): assoc_editor_template = re.escape('email/notification_email.jinja2') assoc_editor_to = re.escape('associate@example.com') - assoc_editor_subject = self.svc.short_notification(ApplicationAssedInprogressNotify.ID)# "an application assigned to you has not passed review." + assoc_editor_subject = re.escape(self.svc.short_notification(ApplicationAssedInprogressNotify.ID).replace("{issns}", ", ".join(issn for issn in processor.source.bibjson().issns())))# "an application assigned to you has not passed review." assoc_editor_email_matched = re.search(email_log_regex % (assoc_editor_template, assoc_editor_to, assoc_editor_subject), info_stream_contents, re.DOTALL) @@ -288,7 +288,7 @@ def test_01_maned_review_emails(self): editor_template = re.escape('email/notification_email.jinja2') editor_to = re.escape('eddie@example.com') - editor_subject = "Directory of Open Access Journals - Application reverted to 'In Progress' by Managing Editor" + editor_subject = re.escape("Directory of Open Access Journals - Application reverted to 'In Progress' by Managing Editor (" + ", ".join(issn for issn in processor.source.bibjson().issns()) + ")") editor_email_matched = re.search(email_log_regex % (editor_template, editor_to, editor_subject), info_stream_contents, re.DOTALL) @@ -304,7 +304,7 @@ def test_01_maned_review_emails(self): assoc_editor_template = re.escape('email/notification_email.jinja2') assoc_editor_to = re.escape('associate@example.com') - assoc_editor_subject = self.svc.short_notification(ApplicationAssedInprogressNotify.ID) # "an application assigned to you has not passed review." + assoc_editor_subject = re.escape(self.svc.short_notification(ApplicationAssedInprogressNotify.ID).replace("{issns}", ", ".join(issn for issn in processor.source.bibjson().issns()))) # "an application assigned to you has not passed review." assoc_editor_email_matched = re.search( email_log_regex % (assoc_editor_template, assoc_editor_to, assoc_editor_subject), info_stream_contents, @@ -345,7 +345,7 @@ def test_01_maned_review_emails(self): # * and to the publisher informing them there's an editor assigned. assEd_template = re.escape('email/notification_email.jinja2') assEd_to = re.escape(models.Account.pull('associate_3').email) - assEd_subject = 'Directory of Open Access Journals - New application assigned to you' + assEd_subject = re.escape('Directory of Open Access Journals - New application assigned to you (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') assEd_email_matched = re.search(email_log_regex % (assEd_template, assEd_to, assEd_subject), info_stream_contents, @@ -354,7 +354,7 @@ def test_01_maned_review_emails(self): publisher_template = re.escape('email/notification_email.jinja2') publisher_to = re.escape(owner.email) - publisher_subject = 'Directory of Open Access Journals - Your application has been assigned an editor for review' + publisher_subject = re.escape('Directory of Open Access Journals - Your application has been assigned an editor for review (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') publisher_email_matched = re.search(email_log_regex % (publisher_template, publisher_to, publisher_subject), info_stream_contents, @@ -386,7 +386,7 @@ def test_01_maned_review_emails(self): # * to the AssEd who's been assigned editor_template = re.escape('email/notification_email.jinja2') editor_to = re.escape('eddie@example.com') - editor_subject = 'Directory of Open Access Journals - New application assigned to your group' + editor_subject = re.escape('Directory of Open Access Journals - New application assigned to your group (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') editor_email_matched = re.search(email_log_regex % (editor_template, editor_to, editor_subject), info_stream_contents, @@ -395,7 +395,7 @@ def test_01_maned_review_emails(self): assEd_template = re.escape('email/notification_email.jinja2') assEd_to = re.escape(models.Account.pull('associate_3').email) - assEd_subject = 'Directory of Open Access Journals - New application assigned to you' + assEd_subject = re.escape('Directory of Open Access Journals - New application assigned to you (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') assEd_email_matched = re.search(email_log_regex % (assEd_template, assEd_to, assEd_subject), info_stream_contents, @@ -435,7 +435,7 @@ def test_01_maned_review_emails(self): # * to the ManEd in charge of the assigned Editor Group, saying an application is ready manEd_template = re.escape('email/notification_email.jinja2') manEd_to = re.escape(acc.email) - manEd_subject = 'Directory of Open Access Journals - Application marked as ready' + manEd_subject = re.escape('Directory of Open Access Journals - Application marked as ready (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') manEd_email_matched = re.search(email_log_regex % (manEd_template, manEd_to, manEd_subject), info_stream_contents, @@ -460,7 +460,7 @@ def test_01_maned_review_emails(self): # * to the publisher, informing them of the journal's acceptance publisher_template = re.escape('email/notification_email.jinja2') publisher_to = re.escape(owner.email) - publisher_subject = 'Directory of Open Access Journals - Your journal has been accepted' + publisher_subject = re.escape('Directory of Open Access Journals - Your journal has been accepted (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') publisher_email_matched = re.search(email_log_regex % (publisher_template, publisher_to, publisher_subject), info_stream_contents, @@ -511,7 +511,7 @@ def test_02_ed_review_emails(self): # * to the ManEds, saying an application is ready manEd_template = 'email/notification_email.jinja2' manEd_to = re.escape("maned@example.com") - manEd_subject = 'Application marked as ready' + manEd_subject = re.escape('Application marked as ready (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') manEd_email_matched = re.search(email_log_regex % (manEd_template, manEd_to, manEd_subject), info_stream_contents, @@ -546,7 +546,7 @@ def test_02_ed_review_emails(self): # * and to the publisher informing them there's an editor assigned. assEd_template = 'email/notification_email.jinja2' assEd_to = re.escape(models.Account.pull('associate_3').email) - assEd_subject = 'New application assigned to you' + assEd_subject = re.escape('New application assigned to you (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') assEd_email_matched = re.search(email_log_regex % (assEd_template, assEd_to, assEd_subject), info_stream_contents, @@ -555,7 +555,7 @@ def test_02_ed_review_emails(self): publisher_template = 'email/notification_email.jinja2' publisher_to = re.escape(owner.email) - publisher_subject = 'Your update request has been assigned an editor for review' + publisher_subject = re.escape('Your update request has been assigned an editor for review (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') publisher_email_matched = re.search(email_log_regex % (publisher_template, publisher_to, publisher_subject), info_stream_contents, @@ -584,7 +584,7 @@ def test_02_ed_review_emails(self): # * to the AssEd who's been assigned, assEd_template = 'email/notification_email.jinja2' assEd_to = re.escape(models.Account.pull('associate_2').email) - assEd_subject = 'New application assigned to you' + assEd_subject = re.escape('New application assigned to you (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') assEd_email_matched = re.search(email_log_regex % (assEd_template, assEd_to, assEd_subject), info_stream_contents, @@ -626,7 +626,7 @@ def test_02_ed_review_emails(self): # * to the editor telling them an application has reverted to in progress assoc_editor_template = re.escape('email/notification_email.jinja2') assoc_editor_to = re.escape('associate@example.com') - assoc_editor_subject = "One of your applications has not passed review" + assoc_editor_subject = re.escape("One of your applications has not passed review (" + ", ".join(issn for issn in processor.source.bibjson().issns()) + ")") assoc_editor_email_matched = re.search( email_log_regex % (assoc_editor_template, assoc_editor_to, assoc_editor_subject), info_stream_contents, @@ -668,7 +668,7 @@ def test_03_assoc_ed_review_emails(self): # * to the publisher, notifying that an editor is viewing their application publisher_template = re.escape('email/notification_email.jinja2') publisher_to = re.escape(owner.email) - publisher_subject = 'Directory of Open Access Journals - Your submission is under review' + publisher_subject = re.escape('Directory of Open Access Journals - Your submission is under review (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') publisher_email_matched = re.search(email_log_regex % (publisher_template, publisher_to, publisher_subject), info_stream_contents, @@ -689,7 +689,7 @@ def test_03_assoc_ed_review_emails(self): # * to the editor, informing them an application has been completed by an Associate Editor editor_template = re.escape('notification_email.jinja2') editor_to = re.escape('eddie@example.com') - editor_subject = 'Directory of Open Access Journals - Application marked as completed' + editor_subject = re.escape('Directory of Open Access Journals - Application marked as completed (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') editor_email_matched = re.search(email_log_regex % (editor_template, editor_to, editor_subject), info_stream_contents, re.DOTALL) @@ -805,7 +805,7 @@ def test_01_maned_review_emails(self): editor_template = re.escape('email/notification_email.jinja2') editor_to = re.escape('eddie@example.com') - editor_subject = "Application reverted to 'In Progress' by Managing Editor" + editor_subject = re.escape("Application reverted to 'In Progress' by Managing Editor (" + ", ".join(issn for issn in processor.source.bibjson().issns()) + ")") editor_email_matched = re.search(email_log_regex % (editor_template, editor_to, editor_subject), info_stream_contents, re.DOTALL) @@ -822,8 +822,8 @@ def test_01_maned_review_emails(self): assoc_editor_template = re.escape('email/notification_email.jinja2') assoc_editor_to = re.escape('associate@example.com') - assoc_editor_subject = self.svc.short_notification( - ApplicationAssedInprogressNotify.ID) # "an application assigned to you has not passed review." + assoc_editor_subject = re.escape(self.svc.short_notification( + ApplicationAssedInprogressNotify.ID.replace("{issns}", ", ".join(issn for issn in processor.source.bibjson().issns())))) # "an application assigned to you has not passed review." assoc_editor_email_matched = re.search( email_log_regex % (assoc_editor_template, assoc_editor_to, assoc_editor_subject), info_stream_contents, @@ -876,7 +876,7 @@ def test_01_maned_review_emails(self): editor_template = re.escape('email/notification_email.jinja2') editor_to = re.escape('eddie@example.com') - editor_subject = "Application reverted to 'In Progress' by Managing Editor" + editor_subject = re.escape("Application reverted to 'In Progress' by Managing Editor (" + ", ".join(issn for issn in processor.source.bibjson().issns()) + ")") editor_email_matched = re.search(email_log_regex % (editor_template, editor_to, editor_subject), info_stream_contents, re.DOTALL) @@ -893,8 +893,8 @@ def test_01_maned_review_emails(self): assoc_editor_template = re.escape('email/notification_email.jinja2') assoc_editor_to = re.escape('associate@example.com') - assoc_editor_subject = self.svc.short_notification( - ApplicationAssedInprogressNotify.ID) # "an application assigned to you has not passed review." + assoc_editor_subject = re.escape(self.svc.short_notification( + ApplicationAssedInprogressNotify.ID.replace("{issns}", ", ".join(issn for issn in processor.source.bibjson().issns())))) # "an application assigned to you has not passed review." assoc_editor_email_matched = re.search( email_log_regex % (assoc_editor_template, assoc_editor_to, assoc_editor_subject), info_stream_contents, @@ -929,7 +929,7 @@ def test_01_maned_review_emails(self): # * and to the publisher informing them there's an editor assigned. assEd_template = 'email/notification_email.jinja2' assEd_to = re.escape(models.Account.pull('associate_3').email) - assEd_subject = 'New application assigned to you' + assEd_subject = re.escape('New application assigned to you (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') assEd_email_matched = re.search(email_log_regex % (assEd_template, assEd_to, assEd_subject), info_stream_contents, @@ -938,7 +938,7 @@ def test_01_maned_review_emails(self): publisher_template = 'email/notification_email.jinja2' publisher_to = re.escape(owner.email) - publisher_subject = 'Your update request has been assigned an editor for review' + publisher_subject = re.escape('Your update request has been assigned an editor for review (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') publisher_email_matched = re.search(email_log_regex % (publisher_template, publisher_to, publisher_subject), info_stream_contents, @@ -970,7 +970,7 @@ def test_01_maned_review_emails(self): # * to the AssEd who's been assigned editor_template = re.escape('email/notification_email.jinja2') editor_to = re.escape('eddie@example.com') - editor_subject = 'New application assigned to your group' + editor_subject = re.escape('New application assigned to your group (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') editor_email_matched = re.search(email_log_regex % (editor_template, editor_to, editor_subject), info_stream_contents, @@ -979,7 +979,7 @@ def test_01_maned_review_emails(self): assEd_template = 'email/notification_email.jinja2' assEd_to = re.escape(models.Account.pull('associate_3').email) - assEd_subject = 'New application assigned to you' + assEd_subject = re.escape('New application assigned to you (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') assEd_email_matched = re.search(email_log_regex % (assEd_template, assEd_to, assEd_subject), info_stream_contents, @@ -1007,7 +1007,7 @@ def test_01_maned_review_emails(self): # * to the ManEds, saying an application is ready manEd_template = 'email/notification_email.jinja2' manEd_to = re.escape("maned@example.com") - manEd_subject = 'Application marked as ready' + manEd_subject = re.escape('Application marked as ready (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') manEd_email_matched = re.search(email_log_regex % (manEd_template, manEd_to, manEd_subject), info_stream_contents, @@ -1034,7 +1034,7 @@ def test_01_maned_review_emails(self): # * to the journal contact, informing them of the journal's acceptance publisher_template = 'email/notification_email.jinja2' publisher_to = re.escape(owner.email) - publisher_subject = 'Update request accepted' + publisher_subject = re.escape('Update request accepted (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') publisher_email_matched = re.search(email_log_regex % (publisher_template, publisher_to, publisher_subject), info_stream_contents, @@ -1084,7 +1084,7 @@ def test_02_ed_review_emails(self): # * to the ManEds, saying an application is ready manEd_template = 'email/notification_email.jinja2' manEd_to = re.escape("maned@example.com") - manEd_subject = 'Application marked as ready' + manEd_subject = re.escape('Application marked as ready (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') manEd_email_matched = re.search(email_log_regex % (manEd_template, manEd_to, manEd_subject), info_stream_contents, @@ -1118,7 +1118,7 @@ def test_02_ed_review_emails(self): # * and to the publisher informing them there's an editor assigned. assEd_template = 'email/notification_email.jinja2' assEd_to = re.escape(models.Account.pull('associate_3').email) - assEd_subject = 'New application assigned to you' + assEd_subject = re.escape('New application assigned to you (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') assEd_email_matched = re.search(email_log_regex % (assEd_template, assEd_to, assEd_subject), info_stream_contents, @@ -1127,7 +1127,7 @@ def test_02_ed_review_emails(self): publisher_template = 'email/notification_email.jinja2' publisher_to = re.escape(owner.email) - publisher_subject = 'Your update request has been assigned an editor for review' + publisher_subject = re.escape('Your update request has been assigned an editor for review (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') publisher_email_matched = re.search(email_log_regex % (publisher_template, publisher_to, publisher_subject), info_stream_contents, @@ -1156,7 +1156,7 @@ def test_02_ed_review_emails(self): # * to the AssEd who's been assigned, assEd_template = 'email/notification_email.jinja2' assEd_to = re.escape(models.Account.pull('associate_2').email) - assEd_subject = 'New application assigned to you' + assEd_subject = re.escape('New application assigned to you (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') assEd_email_matched = re.search(email_log_regex % (assEd_template, assEd_to, assEd_subject), info_stream_contents, @@ -1197,7 +1197,7 @@ def test_02_ed_review_emails(self): # * to the associate editor, informing them the application has been bounced back to in progress. assoc_editor_template = re.escape('email/notification_email.jinja2') assoc_editor_to = re.escape('associate@example.com') - assoc_editor_subject = "One of your applications has not passed review" + assoc_editor_subject = re.escape("One of your applications has not passed review (" + ", ".join(issn for issn in processor.source.bibjson().issns()) + ")") assoc_editor_email_matched = re.search( email_log_regex % (assoc_editor_template, assoc_editor_to, assoc_editor_subject), info_stream_contents, @@ -1243,7 +1243,7 @@ def test_03_assoc_ed_review_emails(self): # * to the publisher, notifying that an editor is viewing their application publisher_template = re.escape('email/notification_email.jinja2') publisher_to = re.escape(owner.email) - publisher_subject = 'Your submission is under review' + publisher_subject = re.escape('Your submission is under review (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') publisher_email_matched = re.search(email_log_regex % (publisher_template, publisher_to, publisher_subject), info_stream_contents, @@ -1264,7 +1264,7 @@ def test_03_assoc_ed_review_emails(self): # * to the editor, informing them an application has been completed by an Associate Editor editor_template = re.escape('email/notification_email.jinja2') editor_to = re.escape('eddie@example.com') - editor_subject = "Application marked as completed" + editor_subject = re.escape("Application marked as completed (" + ", ".join(issn for issn in processor.source.bibjson().issns()) + ")") editor_email_matched = re.search(email_log_regex % (editor_template, editor_to, editor_subject), info_stream_contents, re.DOTALL) @@ -1332,7 +1332,7 @@ def test_01_maned_review_emails(self): # * to the AssEd who's been assigned, editor_template = re.escape('email/notification_email.jinja2') editor_to = re.escape('eddie@example.com') - editor_subject = 'Directory of Open Access Journals - New journal assigned to your group' + editor_subject = re.escape('Directory of Open Access Journals - New journal assigned to your group (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') editor_email_matched = re.search(email_log_regex % (editor_template, editor_to, editor_subject), info_stream_contents, @@ -1341,7 +1341,7 @@ def test_01_maned_review_emails(self): assEd_template = re.escape('email/notification_email.jinja2') assEd_to = re.escape(models.Account.pull('associate_3').email) - assEd_subject = 'Directory of Open Access Journals - New journal assigned to you' + assEd_subject = re.escape('Directory of Open Access Journals - New journal assigned to you (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') assEd_email_matched = re.search(email_log_regex % (assEd_template, assEd_to, assEd_subject), info_stream_contents, @@ -1372,7 +1372,7 @@ def test_02_ed_review_emails(self): # * to the AssEd who's been assigned assEd_template = re.escape('email/notification_email.jinja2') assEd_to = re.escape(models.Account.pull('associate_2').email) - assEd_subject = 'Directory of Open Access Journals - New journal assigned to you' + assEd_subject = re.escape('Directory of Open Access Journals - New journal assigned to you (' + ', '.join(issn for issn in processor.source.bibjson().issns()) + ')') assEd_email_matched = re.search(email_log_regex % (assEd_template, assEd_to, assEd_subject), info_stream_contents, From 5a12143aae4be740c9906d5e7e647fe986921319 Mon Sep 17 00:00:00 2001 From: Aga Date: Thu, 29 Jun 2023 12:44:52 +0100 Subject: [PATCH 08/23] fix maned review emails test --- .../test_application_processor_emails.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doajtest/unit/application_processors/test_application_processor_emails.py b/doajtest/unit/application_processors/test_application_processor_emails.py index aeaa1a1395..07eeccd990 100644 --- a/doajtest/unit/application_processors/test_application_processor_emails.py +++ b/doajtest/unit/application_processors/test_application_processor_emails.py @@ -236,7 +236,7 @@ def test_01_maned_review_emails(self): assoc_editor_template = re.escape('email/notification_email.jinja2') assoc_editor_to = re.escape('associate@example.com') - assoc_editor_subject = re.escape(self.svc.short_notification(ApplicationAssedInprogressNotify.ID).replace("{issns}", ", ".join(issn for issn in processor.source.bibjson().issns())))# "an application assigned to you has not passed review." + assoc_editor_subject = re.escape(self.svc.short_notification(ApplicationAssedInprogressNotify.ID).replace("{issns}", ", ".join(issn for issn in processor.source.bibjson().issns())) + "\n")# "an application assigned to you has not passed review." assoc_editor_email_matched = re.search(email_log_regex % (assoc_editor_template, assoc_editor_to, assoc_editor_subject), info_stream_contents, re.DOTALL) @@ -304,7 +304,7 @@ def test_01_maned_review_emails(self): assoc_editor_template = re.escape('email/notification_email.jinja2') assoc_editor_to = re.escape('associate@example.com') - assoc_editor_subject = re.escape(self.svc.short_notification(ApplicationAssedInprogressNotify.ID).replace("{issns}", ", ".join(issn for issn in processor.source.bibjson().issns()))) # "an application assigned to you has not passed review." + assoc_editor_subject = re.escape(self.svc.short_notification(ApplicationAssedInprogressNotify.ID).replace("{issns}", ", ".join(issn for issn in processor.source.bibjson().issns())) + "\n") # "an application assigned to you has not passed review." assoc_editor_email_matched = re.search( email_log_regex % (assoc_editor_template, assoc_editor_to, assoc_editor_subject), info_stream_contents, @@ -823,7 +823,7 @@ def test_01_maned_review_emails(self): assoc_editor_template = re.escape('email/notification_email.jinja2') assoc_editor_to = re.escape('associate@example.com') assoc_editor_subject = re.escape(self.svc.short_notification( - ApplicationAssedInprogressNotify.ID.replace("{issns}", ", ".join(issn for issn in processor.source.bibjson().issns())))) # "an application assigned to you has not passed review." + ApplicationAssedInprogressNotify.ID).replace("{issns}", ", ".join(issn for issn in processor.target.bibjson().issns())) + "\n") # "an application assigned to you has not passed review." assoc_editor_email_matched = re.search( email_log_regex % (assoc_editor_template, assoc_editor_to, assoc_editor_subject), info_stream_contents, @@ -894,7 +894,7 @@ def test_01_maned_review_emails(self): assoc_editor_template = re.escape('email/notification_email.jinja2') assoc_editor_to = re.escape('associate@example.com') assoc_editor_subject = re.escape(self.svc.short_notification( - ApplicationAssedInprogressNotify.ID.replace("{issns}", ", ".join(issn for issn in processor.source.bibjson().issns())))) # "an application assigned to you has not passed review." + ApplicationAssedInprogressNotify.ID).replace("{issns}", ", ".join(issn for issn in processor.source.bibjson().issns())) + "\n") # "an application assigned to you has not passed review." assoc_editor_email_matched = re.search( email_log_regex % (assoc_editor_template, assoc_editor_to, assoc_editor_subject), info_stream_contents, From 592acf34ab826a6d9e59f203d207dcee6f10d10e Mon Sep 17 00:00:00 2001 From: Aga Date: Fri, 7 Jul 2023 10:04:20 +0100 Subject: [PATCH 09/23] add padding above the user tag in editorial-panel --- cms/sass/layout/_editorial-panel.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/cms/sass/layout/_editorial-panel.scss b/cms/sass/layout/_editorial-panel.scss index 4cef1bbef4..442e2f7779 100644 --- a/cms/sass/layout/_editorial-panel.scss +++ b/cms/sass/layout/_editorial-panel.scss @@ -19,6 +19,7 @@ &__content { max-height: 70vh; overflow-y: scroll; + margin-top: $spacing-02; select, textarea, input { display: block; From 619c0901772a6abb83c27ff3a1d018e997160473 Mon Sep 17 00:00:00 2001 From: Aga Date: Mon, 24 Jul 2023 08:27:09 +0100 Subject: [PATCH 10/23] move contact above lock buttons --- cms/sass/layout/_editorial-panel.scss | 3 +-- portality/templates/application_form/editorial_side_panel.html | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cms/sass/layout/_editorial-panel.scss b/cms/sass/layout/_editorial-panel.scss index 442e2f7779..a08cb98ca3 100644 --- a/cms/sass/layout/_editorial-panel.scss +++ b/cms/sass/layout/_editorial-panel.scss @@ -14,12 +14,11 @@ @media (min-width: 992px) { position: -webkit-sticky; position: sticky; - top: 55px; // sticky header + 5px + top: 100px; &__content { max-height: 70vh; overflow-y: scroll; - margin-top: $spacing-02; select, textarea, input { display: block; diff --git a/portality/templates/application_form/editorial_side_panel.html b/portality/templates/application_form/editorial_side_panel.html index b7a86f5ef1..34db9ba93e 100644 --- a/portality/templates/application_form/editorial_side_panel.html +++ b/portality/templates/application_form/editorial_side_panel.html @@ -1,3 +1,4 @@ +{% include "application_form/_contact.html" %} {% if obj %}

LOCKED FOR EDITING UNTIL {{lock.expire_formatted()}}

{% if obj.application_status != constants.APPLICATION_STATUS_ACCEPTED %} @@ -17,8 +18,6 @@

LOCKED FOR EDITING UNTIL -{% include "application_form/_contact.html" %} -
{% set fs = formulaic_context.fieldset("notes") %} {% if fs %} From f6f0717c5b9c83aa477bf06aa317bccf75c0e5eb Mon Sep 17 00:00:00 2001 From: Aga Date: Mon, 24 Jul 2023 12:29:04 +0100 Subject: [PATCH 11/23] use hoverIntent to open Notifications menu more intentionally --- cms/sass/components/_dropdown.scss | 4 ++++ portality/static/js/notifications.js | 8 ++++++++ portality/static/js/vendors/jquery.hoverIntent.min.js | 9 +++++++++ portality/templates/_js_includes.html | 1 + portality/templates/layouts/dashboard_base.html | 4 ++-- 5 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 portality/static/js/vendors/jquery.hoverIntent.min.js diff --git a/cms/sass/components/_dropdown.scss b/cms/sass/components/_dropdown.scss index 07524b5101..47ab4dc5e7 100644 --- a/cms/sass/components/_dropdown.scss +++ b/cms/sass/components/_dropdown.scss @@ -15,6 +15,10 @@ } } +.dropdown--notifications { + @extend .dropdown; +} + .dropdown__menu { display: none; padding: 0; diff --git a/portality/static/js/notifications.js b/portality/static/js/notifications.js index 6bf24b3010..ad11ea577d 100644 --- a/portality/static/js/notifications.js +++ b/portality/static/js/notifications.js @@ -58,6 +58,14 @@ doaj.notifications.notificationsReceived = function(data) { } $(".notification_action_link").on("click", doaj.notifications.notificationClicked); + $("#dropdown__trigger--notifications").hoverIntent(doaj.notifications.showDropdown, doaj.notifications.hideDropdown); +} + +doaj.notifications.showDropdown = function(e) { + $("#top_notifications").show(); +} +doaj.notifications.hideDropdown = function() { + $("#top_notifications").hide(); } doaj.notifications.notificationClicked = function(event) { diff --git a/portality/static/js/vendors/jquery.hoverIntent.min.js b/portality/static/js/vendors/jquery.hoverIntent.min.js new file mode 100644 index 0000000000..270354a739 --- /dev/null +++ b/portality/static/js/vendors/jquery.hoverIntent.min.js @@ -0,0 +1,9 @@ +/*! + * hoverIntent v1.10.2 // 2020.04.28 // jQuery v1.7.0+ + * http://briancherne.github.io/jquery-hoverIntent/ + * + * You may use hoverIntent under the terms of the MIT license. Basically that + * means you are free to use hoverIntent as long as this header is left intact. + * Copyright 2007-2019 Brian Cherne + */ +!function(factory){"use strict";"function"==typeof define&&define.amd?define(["jquery"],factory):"object"==typeof module&&module.exports?module.exports=factory(require("jquery")):jQuery&&!jQuery.fn.hoverIntent&&factory(jQuery)}(function($){"use strict";function track(ev){cX=ev.pageX,cY=ev.pageY}function isFunction(value){return"function"==typeof value}var cX,cY,_cfg={interval:100,sensitivity:6,timeout:0},INSTANCE_COUNT=0,compare=function(ev,$el,s,cfg){if(Math.sqrt((s.pX-cX)*(s.pX-cX)+(s.pY-cY)*(s.pY-cY)) + {# get bootstrap js #} {# TODO: this is probably not the right place to keep this file #} {# I’m using a much smaller & reduced version of Boostrap’s JS, with some modified classes and only the components we need #} diff --git a/portality/templates/layouts/dashboard_base.html b/portality/templates/layouts/dashboard_base.html index d6366735b4..137f05cdca 100644 --- a/portality/templates/layouts/dashboard_base.html +++ b/portality/templates/layouts/dashboard_base.html @@ -23,8 +23,8 @@

DOAJ Dashboard