[Koha-bugs] [Bug 12029] Patrons should be able to delete their patron messages

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Apr 25 11:27:05 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12029

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA

--- Comment #27 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Hi Hayley and all, 

trying to give this another push forward.

1) Unit tests (blocker)
We are still missing the unit tests. Is there any update on that?

2) Database update
The database update is still a bit too verbose, as noted earlier, using some
uncommon output pattern (ALTERATION, NOTICE and INFO are not needed). We said
RM could deal with it, so just explaining a bit more what people meant earlier
on:

+use Modern::Perl;
+
+return {
+    bug_number => "12029",
+    description => "Enable patrons to delete messages",
+    up => sub {
+        my ($args) = @_;
+        my ($dbh, $out) = @$args{qw(dbh out)};
+
+        # Do you stuffs here
+        my $alteration = q{
+            ALTER TABLE messages
+            ADD COLUMN `patron_read_date` timestamp NULL DEFAULT NULL
+            COMMENT 'date and time patron dismissed message'
+            AFTER `manager_id`
+        };
+        if( column_exists('messages', 'patron_read_date') ) {
+            say $out "NOTICE: Column 'messages.patron_read_date' already
exists";
+        }
+        else {
+            say $out "ALTERATION: $alteration";
+            $dbh->do($alteration);
+        }
+
+        # Print useful stuff here
+        say $out "INFO: Bug 12029 migration applied";
+    },
+};

3) Translatability

There is some code in opac/dismiss_message.pl that I wondered about. It
contains messages that are not translatable, but I am not sure yet if this
would show to patrons, in my tests it didn't seem like it.

comment => "Patron read date already set",
comment => "Set patron_read_date to ($patron_read_date)",

Hm, they might not be used after all?

>11. What are you doing with $result? $inputs and comment are returned from the dismiss_patron_message sub but never >reused. This script could be 10 lines long IMO.


Failing for 1). Testing in the GUI worked well!

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list