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

Enable/disable scheduled reports #3871

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

madelondohmen
Copy link
Contributor

Changes

This PR makes it possible to disable and enable scheduled reports.
It also makes some changes in the scheduled reports table conform the new design (see ticket).

Besides this, I've created enable/disable tags that haven't been implemented as a component yet. That's why I've implemented it the same way as how it's done for the grey label ("tags-color-grey-2").

Issue link

Closes #3124

Demo

Opname.2024-11-20.161301.mp4

QA notes

  • Create a report and schedule it
  • You'll be directed to the scheduled reports page
  • Expand the row of the created report
  • Click on "Disable schedule" --> Check if it works as intended
  • Expand the row of the created report
  • Click on "Enable schedule" --> Check if it works as intended

Check the video for an example.


Code Checklist

  • All the commits in this PR are properly PGP-signed and verified.
  • This PR only contains functionality relevant to the issue.
  • I have written unit tests for the changes or fixes I made.
  • I have checked the documentation and made changes where necessary.
  • I have performed a self-review of my code and refactored it to the best of my abilities.
  • Tickets have been created for newly discovered issues.
  • For any non-trivial functionality, I have added integration and/or end-to-end tests.
  • I have informed others of any required .env changes files if required and changed the .env-dist accordingly.
  • I have included comments in the code to elaborate on what is not self-evident from the code itself, including references to issues and discussions online, or implicit behavior of an interface.

Checklist for code reviewers:

Copy-paste the checklist from the docs/source/templates folder into your comment.


Checklist for QA:

Copy-paste the checklist from the docs/source/templates folder into your comment.

@madelondohmen madelondohmen self-assigned this Nov 21, 2024
@madelondohmen madelondohmen requested a review from a team as a code owner November 21, 2024 07:56
@madelondohmen madelondohmen marked this pull request as draft November 21, 2024 08:23
@madelondohmen madelondohmen marked this pull request as ready for review November 21, 2024 10:48
Copy link

sonarcloud bot commented Nov 21, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
30.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copy link
Contributor

@ammar92 ammar92 left a comment

Choose a reason for hiding this comment

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

Tiny suggestions, looks good otherwise

<td class="nowrap">{{ schedule.deadline_at }}</td>
<td class="nowrap">
{% if not schedule.enabled %}
{% translate "-" %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't need to be translated

<td>
{% if report.input_oois|length == 1 %}
{% with ooi=report.input_oois.0 %}
<a href="{% ooi_url 'ooi_detail' ooi organization.code query=ooi.mandatory_fields %}">{{ ooi|human_readable }}</a>
{% endwith %}
{% else %}
{{ report.input_oois|length }}
{{ report.input_oois|length }} {% translate "objects" %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to use pluralization here:

{% blocktrans count report.input_oois as objects %}
    {{ objects }} object
    {% plural %}
    {{ objects }} objects
{% endblocktrans %}

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.

Cancel the scheduled reports
3 participants