Bug 28813 - Fix recording and display of delivery errors for patron notices
Summary: Fix recording and display of delivery errors for patron notices
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords: rel_21_05_candidate
Depends on: 14723
Blocks: 28803
  Show dependency treegraph
 
Reported: 2021-08-05 07:40 UTC by Martin Renvoize
Modified: 2021-08-13 20:15 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.03


Attachments
Bug 28813: Update database field name (2.16 KB, patch)
2021-08-05 09:25 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 28813: DBIC Schema Update (1.35 KB, patch)
2021-08-05 09:25 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 28813: Update unit tests (2.50 KB, patch)
2021-08-05 09:25 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 28813: Rename delivery_note to failure_code (11.31 KB, patch)
2021-08-05 09:25 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 28813: Update database field name (2.21 KB, patch)
2021-08-05 20:59 UTC, David Nind
Details | Diff | Splinter Review
Bug 28813: DBIC Schema Update (1.40 KB, patch)
2021-08-05 20:59 UTC, David Nind
Details | Diff | Splinter Review
Bug 28813: Update unit tests (2.55 KB, patch)
2021-08-05 20:59 UTC, David Nind
Details | Diff | Splinter Review
Bug 28813: Rename delivery_note to failure_code (11.36 KB, patch)
2021-08-05 21:00 UTC, David Nind
Details | Diff | Splinter Review
Bug 28813: Update database field name (2.27 KB, patch)
2021-08-10 11:03 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28813: DBIC Schema Update (1.46 KB, patch)
2021-08-10 11:04 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28813: Update unit tests (2.61 KB, patch)
2021-08-10 11:04 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28813: Rename delivery_note to failure_code (11.43 KB, patch)
2021-08-10 11:04 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2021-08-05 07:40:28 UTC
Bug 14723 somehow made it through QA with some fields missing from the database and some functions missing corresponding updates (for translation handling). We all make mistakes.. oops.

This bug will serve to add the correct DB update and changes to kohastructure and update the relevant function.

See bug 14723 comment 60 for further details.
Comment 1 Martin Renvoize 2021-08-05 09:25:47 UTC
Created attachment 123471 [details] [review]
Bug 28813: Update database field name

Update the database field name from 'delivery_note' to 'failure_code' to
more accurately denote it's use.
Comment 2 Martin Renvoize 2021-08-05 09:25:50 UTC
Created attachment 123472 [details] [review]
Bug 28813: DBIC Schema Update
Comment 3 Martin Renvoize 2021-08-05 09:25:54 UTC
Created attachment 123473 [details] [review]
Bug 28813: Update unit tests

This patch updates the unit tests to check for failure_code instead of
delivery_note and catches a missing case.
Comment 4 Martin Renvoize 2021-08-05 09:25:57 UTC
Created attachment 123474 [details] [review]
Bug 28813: Rename delivery_note to failure_code

We now use the codes from the half implimented error_code in place of
the plain text that was being added to the delivery_note field. As part
of that we rename the field to failure_code to clarify it's intended
content.

Test plan
1/ Confirm t/db_dependent/Letters.t passes
Comment 5 David Nind 2021-08-05 20:59:48 UTC
Created attachment 123536 [details] [review]
Bug 28813: Update database field name

Update the database field name from 'delivery_note' to 'failure_code' to
more accurately denote it's use.

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2021-08-05 20:59:53 UTC
Created attachment 123537 [details] [review]
Bug 28813: DBIC Schema Update

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2021-08-05 20:59:58 UTC
Created attachment 123538 [details] [review]
Bug 28813: Update unit tests

This patch updates the unit tests to check for failure_code instead of
delivery_note and catches a missing case.

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2021-08-05 21:00:03 UTC
Created attachment 123539 [details] [review]
Bug 28813: Rename delivery_note to failure_code

We now use the codes from the half implimented error_code in place of
the plain text that was being added to the delivery_note field. As part
of that we rename the field to failure_code to clarify it's intended
content.

Test plan
1/ Confirm t/db_dependent/Letters.t passes

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 David Nind 2021-08-05 21:02:23 UTC
Testing notes (koha-testing-docker):
- prove t/db_dependent/Letters.t (before apply patches)
- apply patches
- updatedatabase + dbic
- flush_memcached
- restart_all
- prove t/db_dependent/Letters.t (tests should pass)

Hope that is sufficient for testing.
Comment 10 Katrin Fischer 2021-08-10 11:03:59 UTC
Created attachment 123667 [details] [review]
Bug 28813: Update database field name

Update the database field name from 'delivery_note' to 'failure_code' to
more accurately denote it's use.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2021-08-10 11:04:03 UTC
Created attachment 123668 [details] [review]
Bug 28813: DBIC Schema Update

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2021-08-10 11:04:08 UTC
Created attachment 123669 [details] [review]
Bug 28813: Update unit tests

This patch updates the unit tests to check for failure_code instead of
delivery_note and catches a missing case.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2021-08-10 11:04:12 UTC
Created attachment 123670 [details] [review]
Bug 28813: Rename delivery_note to failure_code

We now use the codes from the half implimented error_code in place of
the plain text that was being added to the delivery_note field. As part
of that we rename the field to failure_code to clarify it's intended
content.

Test plan
1/ Confirm t/db_dependent/Letters.t passes

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Katrin Fischer 2021-08-10 11:05:32 UTC
Tested similarly as David, additionally updated failure_code in my database to check the display on the notices tab.
Comment 15 Katrin Fischer 2021-08-10 11:06:43 UTC
Maybe we could update the bug description a bit, keeping release notes in mind.
Comment 16 Jonathan Druart 2021-08-11 11:24:20 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 17 Martin Renvoize 2021-08-11 11:49:35 UTC
(In reply to Katrin Fischer from comment #15)
> Maybe we could update the bug description a bit, keeping release notes in
> mind.

Done.
Comment 18 Kyle M Hall 2021-08-13 11:47:25 UTC
Pushed to 21.05.x for 21.05.03
Comment 19 Fridolin Somers 2021-08-13 20:15:01 UTC
Depends on Bug 14723 not in 20.11.x