Skip to content
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

change sort ordering and date displays on dashboards #2320

Merged
merged 4 commits into from
Dec 19, 2023

Conversation

richard-jones
Copy link
Contributor

Fixes a number of sort and date display issues on the dashboard pages

Please don't delete any sections when completing this PR template; instead enter N/A for checkboxes or sections which are not applicable, unless otherwise stated below

See https://github.com/DOAJ/doajPM/issues/3733

Changes the default sorting to admin.date_applied rather than created_date due to some oddities with the differences between these dates. Also uses admin.date_applied to display the date on the dashboard.

Categorisation

This PR...

  • has scripts to run
  • has migrations to run
  • adds new infrastructure
  • changes the CI pipeline
  • affects the public site
  • affects the editorial area
  • affects the publisher area
  • affects the monitoring

Basic PR Checklist

Instructions for developers:

  • For each checklist item, if it is N/A to your PR check the N/A box
  • For each item that you have done and confirmed for yourself, check Developer box (including if you have checked the N/A box)

Instructions for reviewers:

  • For each checklist item that has been confirmed by the Developer, check the Reviewer box if you agree
  • For multiple reviewers, feel free to add your own checkbox with your github username next to it if that helps with review tracking

Code Style

  • No deprecated methods are used

    • N/A
    • Developer
    • Reviewer
  • No magic strings/numbers - all strings are in constants or messages files

    • N/A
    • Developer
    • Reviewer
  • ES queries are wrapped in a Query object rather than inlined in the code

    • N/A
    • Developer
    • Reviewer
  • Where possible our common library functions have been used (e.g. dates manipulated via dates)

    • N/A
    • Developer
    • Reviewer
  • Cleaned up commented out code, etc

    • N/A
    • Developer
    • Reviewer
  • Urls are constructed with url_for not hard-coded

    • N/A
    • Developer
    • Reviewer

Testing

  • Unit tests have been added/modified

    • N/A
    • Developer
    • Reviewer
  • Functional tests have been added/modified

    • N/A
    • Developer
    • Reviewer
  • Code has been run manually in development, and functional tests followed locally

    • N/A
    • Developer
    • Reviewer
  • Have CSS/style changes been implemented? If they are of a global scope (e.g. on base HTML elements) have the downstream impacts of the change in other areas of the system been considered?

    • N/A
    • Developer
    • Reviewer

Documentation

Release Readiness

Testing

The primary test for this feature is to confirm that in real operation it is giving editors the correct behaviour. To that end, the following testing needs to be applied:

  1. Deploy to a test server, and import the most recent anonymised data
  2. Ask several editors (especially maneds) to review the dashboard and compare to their live dashboard and report on improvements/issues
  3. Specifically check the known issues at the point this issue was raised

In addition, the following regression testing is required for the feature itself:

  1. https://doaj.github.io/doaj-docs/feature/3733_dashboard_sort_adjustments/testbook/index.html#dashboard/associate_editor_todo_list
  2. https://doaj.github.io/doaj-docs/feature/3733_dashboard_sort_adjustments/testbook/index.html#dashboard/editor_todo_list
  3. https://doaj.github.io/doaj-docs/feature/3733_dashboard_sort_adjustments/testbook/index.html#dashboard/maned_todo_list

Deployment

What deployment considerations are there? (delete any sections you don't need)

Configuration changes

N/A

Scripts

N/A

Migrations

N/A

Monitoring

N/A

New Infrastructure

N/A

Continuous Integration

N/A

@@ -95,6 +95,7 @@ def build_application(title, lmu_diff, cd_diff, status, editor=None):
ap.set_id(ap.makeid())
ap.set_last_manual_update(dates.before(datetime.utcnow(), lmu_diff))
ap.set_created(dates.before(datetime.utcnow(), cd_diff))
ap.set_date_applied(dates.before(datetime.utcnow(), cd_diff))
ap.set_application_status(status)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be extract for other build_application to reuse

@@ -158,6 +158,7 @@ def _rationalise_todos(self, todos, size):
class TodoRules(object):
@classmethod
def maned_stalled(cls, size, maned_of):
sort_date = "created_date"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be extract to global variable default_rule_sort_field

@RK206 RK206 merged commit 6fdf6dc into develop Dec 19, 2023
1 check passed
@RK206 RK206 deleted the feature/3733_dashboard_sort_adjustments branch December 19, 2023 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants