Skip to content

Add improved maintenance column with a dropdown showing tasks#1761

Open
Simrayz wants to merge 4 commits intomainfrom
feat/1745-improve-planned-maintenance-column
Open

Add improved maintenance column with a dropdown showing tasks#1761
Simrayz wants to merge 4 commits intomainfrom
feat/1745-improve-planned-maintenance-column

Conversation

@Simrayz
Copy link
Contributor

@Simrayz Simrayz commented Jan 23, 2026

Scope and purpose

Resolves #1745

This PR improves the planned maintenance column by adding a dropdown with linkable connected tasks.

image

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Argus can be found in the
Development docs.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation, including updates to the user manual if feature flow or UI is considerably changed
  • Linted/formatted the code with ruff and djLint, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See our how-to
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • If this results in changes in the UI: Added screenshots of the before and after
  • If this results in changes to the database model: Updated the ER diagram

@Simrayz Simrayz self-assigned this Jan 23, 2026
@github-actions
Copy link

github-actions bot commented Jan 23, 2026

Test results

    6 files    888 suites   1m 56s ⏱️
  697 tests   696 ✅ 1 💤 0 ❌
4 182 runs  4 176 ✅ 6 💤 0 ❌

Results for commit 1851bcf.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Jan 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.57%. Comparing base (7f6da04) to head (1851bcf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1761   +/-   ##
=======================================
  Coverage   82.57%   82.57%           
=======================================
  Files         137      137           
  Lines        6552     6552           
=======================================
  Hits         5410     5410           
  Misses       1142     1142           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Simrayz Simrayz requested a review from a team January 23, 2026 10:46
@Simrayz Simrayz added the frontend Affects frontend label Jan 23, 2026
@Simrayz Simrayz force-pushed the feat/1745-improve-planned-maintenance-column branch from 0d874e8 to 1972920 Compare January 23, 2026 14:30
Copy link
Contributor

@aleksfl aleksfl left a comment

Choose a reason for hiding this comment

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

Mostly works as intended when testing. Documentation should probably be updated accordingly.

Copy link
Contributor

@hmpf hmpf left a comment

Choose a reason for hiding this comment

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

What happens if there are hundreds of incidents covered by the pm?

{% if task.end_time.year >= 9999 %}
- now
{% else %}
- {{ task.end_time|date:"M d, H:i" }}
Copy link
Contributor

@hmpf hmpf Jan 26, 2026

Choose a reason for hiding this comment

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

Let's be consistent with the date formats please. Always use the formats chosen in preferences.

  • |date:preferences.argus_htmx.datetime_format
  • |date:preferences.argus_htmx.date_format
  • |date:preferences.argus_htmx.time_format

If another is needed, for "datetime without year", let's add another to the above list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, it is now using the date_format from user preferences. The idea behind using a custom date format was to present the information in the same way to all users, and keep the UI compact. E.g. an EPOCH timestamp is not very user friendly when used in ranges. However, I agree that it makes sense to be consistent, and leave it up to the user to use a proper date format.

@hmpf hmpf changed the title Add improved maintenace column with a dropdown showing tasks Add improved maintenance column with a dropdown showing tasks Jan 26, 2026
@Simrayz
Copy link
Contributor Author

Simrayz commented Jan 26, 2026

Updated the UI and date format to match requested changes:
image

@Simrayz
Copy link
Contributor Author

Simrayz commented Jan 26, 2026

What happens if there are hundreds of incidents covered by the pm?

The dropdown shows the tasks connected to an incident, and not the other way around (incidents for task). Only open incidents are checked against a new PM task. As such, unless we expect a lot of maintenance tasks covering the same incidents, the dropdown shouldn't have a lot of entries

@johannaengland
Copy link
Contributor

What happens if there are hundreds of incidents covered by the pm?

The dropdown shows the tasks connected to an incident, and not the other way around (incidents for task). Only open incidents are checked against a new PM task. As such, unless we expect a lot of maintenance tasks covering the same incidents, the dropdown shouldn't have a lot of entries

Yeah, I would also not expect hundreds of tasks that all cover one incident - then the user has done something wrong 😁

@sonarqubecloud
Copy link

Copy link
Contributor

@johannaengland johannaengland left a comment

Choose a reason for hiding this comment

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

We can have the bug that when I click on one maintenance task icon that the dropdown stays visible until I click somewhere else as polish, not that important now

@Simrayz
Copy link
Contributor Author

Simrayz commented Jan 26, 2026

We can have the bug that when I click on one maintenance task icon that the dropdown stays visible until I click somewhere else as polish, not that important now

Yeah it seems to be related to the button remaining in focus after clicking it, and happens both in Brave and Firefox. An alternative would be to not use a button element as the trigger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Affects frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Polish: Show list of planned maintenance tasks covering incidents in PM column

4 participants