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

Fix incorrect edit link for void returns #1311

Merged
merged 7 commits into from
Sep 5, 2024
Merged

Conversation

Cruikshanks
Copy link
Member

@Cruikshanks Cruikshanks commented Sep 5, 2024

https://eaflood.atlassian.net/browse/WATER-4661

Our users have noticed that we provide a link for VOID returns on the view licence page that takes them to the returns edit page. Users should not be able to edit a VOID return; unfortunately, there is nothing on the legacy edit page to stop this.

So, we need to fix the link to take users to view returns page, not edit.


While working on this, we also found that the status was showing return logs due 'today' incorrectly (they were showing as "overdue" when the status should be "due").

https://eaflood.atlassian.net/browse/WATER-4661

Our users have spotted that we are providing a link for `VOID` returns in the view licence page that takes users to the returns edit page. Users should not be able to edit a `VOID` return and unfortunately there is nothing in the legacy edit page to stop this.

So, we need to fix the link to take users to view returns page, not edit.
@Cruikshanks Cruikshanks added the bug Something isn't working label Sep 5, 2024
@Cruikshanks Cruikshanks self-assigned this Sep 5, 2024
Use a function which is our convention for larger data sets. Plus update the date to use realistic ID's (return logs don't use GUIDs).
Before we start making changes to the presenter we want to ensure we have proper coverage of everything it is doing now.

One thing it has highlighted is that we are marking overdue a return that is due 'today'. This is because when we generate the variable `today` in the presenter we are not discarding the time.

So, for example, if the return is due 2024-09-05 and the date is the same, when we do the comparison we are actually doing `2024-09-05 00:00:00 < 2024-09-05 13:27:56`.

This means it display as "overdue" when in fact it should be "due" (confirmed by comparing to the legacy version of the returns tab).
@Cruikshanks Cruikshanks marked this pull request as ready for review September 5, 2024 12:01
@Cruikshanks Cruikshanks merged commit 2d941ea into main Sep 5, 2024
6 checks passed
@Cruikshanks Cruikshanks deleted the fix-editing-void-returns branch September 5, 2024 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant