Bug 5476

Summary: Harcoded date format en Members.pm -> GetMessages
Product: Koha Reporter: Martin Longo <jmlongo>
Component: PatronsAssignee: Kyle M Hall <kyle.m.hall>
Status: CLOSED DUPLICATE QA Contact: Bugs List <koha-bugs>
Severity: minor    
Priority: P5 - low CC: gmcharlt
Version: rel_3_2   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Martin Longo 2010-12-06 21:08:59 UTC
I have came across a problem with the messages system, as it displays the messages for the borrowers with a date format that is not the format chosen for the system in SysPrefs...

We use the dd/mm/yyyy date format system wide, and the messages have their dates in the mm/dd/yyyy format.

I backtraced the date that is printed with the message and found that this problematic format is harcoded in the GetMessage routine, inside the module Messages.pm, as can be seen in the following chunk of code...

my $query = "SELECT
                  branches.branchname,
                  messages.*,
                  DATE_FORMAT( message_date, '%m/%d/%Y' ) AS message_date_formatted,
                  messages.branchcode LIKE '$branchcode' AS can_delete
                  FROM messages, branches
                  WHERE borrowernumber = ?
                  AND message_type LIKE ?
                  AND messages.branchcode = branches.branchcode
                  ORDER BY message_date DESC";
Comment 1 Owen Leonard 2010-12-06 21:12:30 UTC

*** This bug has been marked as a duplicate of bug 5475 ***