Skip to content

Notification due dates ignore user preferred date format #12845

Description

@AtCloudDiwash

What problem are you trying to solve with Submitty

PR #12844 adds a feature that allows users to toggle their preferred date/time format. The selected format is applied across the site, but it does not apply to the notification banner.

Image Image

This does not appear to be a bug in the date format toggle itself. The issue seems to come from how notification content is currently stored.

Image Image

The notification message is constructed as a full text paragraph before being saved to the database. Since the date/time is already embedded inside that stored text, it cannot be reformatted later based on the user’s selected date/time preference.

For example, the notification content is constructed with the date/time already included in the message, and then the complete message is stored in the notifications table. Because of this, the system only has the final text content, not a separate timestamp that can be formatted dynamically.

It can be found in send_notification.py under sbin director.

Image Image

Describe the way you'd like to solve this problem

A possible solution would be to separate notification metadata from the final display text.

Instead of storing the full notification message with the formatted date/time embedded directly inside the text, Submitty could store the relevant timestamp/date value separately and format it when rendering the notification banner using the user’s current date/time format preference.

Additional context

This was noticed while working on PR #12844

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions