Bugzilla – Attachment 102313 Details for
Bug 4461
Add a context-sensitive report a problem process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4461: Rename report date with created_on
Bug-4461-Rename-report-date-with-createdon.patch (text/plain), 4.95 KB, created by
David Nind
on 2020-04-02 20:08:48 UTC
(
hide
)
Description:
Bug 4461: Rename report date with created_on
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-04-02 20:08:48 UTC
Size:
4.95 KB
patch
obsolete
>From 08da265e8466212d78a525f990c92d0fc9082f88 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 26 Feb 2020 10:58:38 +0100 >Subject: [PATCH] Bug 4461: Rename report date with created_on > >And make it a timestamp type column > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../atomicupdate/bug-4461_add-problem-reports-table.perl | 4 ++-- > installer/data/mysql/kohastructure.sql | 4 ++-- > opac/opac-reportproblem.pl | 12 +++++++++++- > 3 files changed, 15 insertions(+), 5 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug-4461_add-problem-reports-table.perl b/installer/data/mysql/atomicupdate/bug-4461_add-problem-reports-table.perl >index c8371645d1..11cee3aa67 100644 >--- a/installer/data/mysql/atomicupdate/bug-4461_add-problem-reports-table.perl >+++ b/installer/data/mysql/atomicupdate/bug-4461_add-problem-reports-table.perl >@@ -3,7 +3,7 @@ if( CheckVersion( $DBversion ) ) { > > if( !TableExists( 'problem_reports' ) ){ > $dbh->do(q{ CREATE TABLE problem_reports ( >- reportid int(11) NOT NULL auto_increment, -- unqiue identifier assigned by Koha >+ reportid int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha > title varchar(40) NOT NULL default '', -- report subject line > content varchar(255) NOT NULL default '', -- report message content > borrowernumber int(11) default NULL, -- the user who created the problem report >@@ -11,7 +11,7 @@ if( CheckVersion( $DBversion ) ) { > username varchar(75) default NULL, -- OPAC username > problempage varchar(255) default NULL, -- page the user triggered the problem report form from > recipient enum('admin','library') NOT NULL default 'library', -- the 'to-address' of the problem report >- reportdate datetime default NULL, -- date and time of report submission >+ created_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- timestamp of report submission > status varchar(1) NOT NULL default 'N', -- status of the report. N=new, V=viewed, C=closed > PRIMARY KEY (reportid), > CONSTRAINT problem_reports_ibfk1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE, >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 6f5280ba55..38c2ee55ce 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4442,7 +4442,7 @@ CREATE TABLE return_claims ( > > DROP TABLE IF EXISTS `problem_reports`; > CREATE TABLE `problem_reports` ( >- `reportid` int(11) NOT NULL auto_increment, -- unqiue identifier assigned by Koha >+ `reportid` int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha > `title` varchar(40) NOT NULL default '', -- report subject line > `content` varchar(255) NOT NULL default '', -- report message content > `borrowernumber` int(11) default NULL, -- the user who created the problem report >@@ -4450,7 +4450,7 @@ CREATE TABLE `problem_reports` ( > `username` varchar(75) default NULL, -- OPAC username > `problempage` varchar(255) default NULL, -- page the user triggered the problem report form from > `recipient` enum('admin','library') NOT NULL default 'library', -- the 'to-address' of the problem report >- `reportdate` datetime default NULL, -- date and time of report submission >+ `created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- timestamp of report submission > `status` varchar(1) NOT NULL default 'N', -- status of the report. N=new, V=viewed, C=closed > PRIMARY KEY (`reportid`), > CONSTRAINT `problem_reports_ibfk1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, >diff --git a/opac/opac-reportproblem.pl b/opac/opac-reportproblem.pl >index 7cc261d7ca..77cacfeddd 100644 >--- a/opac/opac-reportproblem.pl >+++ b/opac/opac-reportproblem.pl >@@ -82,7 +82,17 @@ if ( $op eq 'addreport' ) { > my $message = $input->param('message'); > my $place = $input->param('place'); > my $recipient = $input->param('recipient') || 'library'; >- my $problem = Koha::ProblemReport->new({ title => $subject, content => $message, borrowernumber => $borrowernumber, branchcode => $branchcode, username => $username, problempage => $place, recipient => $recipient, reportdate => dt_from_string() })->store; >+ my $problem = Koha::ProblemReport->new( >+ { >+ title => $subject, >+ content => $message, >+ borrowernumber => $borrowernumber, >+ branchcode => $branchcode, >+ username => $username, >+ problempage => $place, >+ recipient => $recipient, >+ } >+ )->store; > $template->param( > recipient => $recipient, > successfuladd => 1, >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 4461
:
58887
|
59032
|
61654
|
65871
|
66253
|
66323
|
66324
|
98687
|
98688
|
98689
|
98725
|
99551
|
99599
|
99600
|
99601
|
99602
|
99603
|
99633
|
99635
|
99636
|
99637
|
99638
|
99639
|
99929
|
99930
|
99931
|
99932
|
99933
|
99934
|
99935
|
99936
|
99937
|
99938
|
99939
|
99940
|
99941
|
99942
|
100488
|
100489
|
100490
|
100491
|
100492
|
100493
|
100494
|
100495
|
100496
|
100497
|
100498
|
100499
|
100500
|
100506
|
100507
|
100508
|
100509
|
100510
|
100511
|
100512
|
100513
|
100514
|
100515
|
100516
|
100517
|
100518
|
100519
|
100520
|
100521
|
100522
|
100523
|
100524
|
100619
|
100989
|
100990
|
102188
|
102189
|
102190
|
102191
|
102192
|
102193
|
102194
|
102195
|
102196
|
102198
|
102200
|
102201
|
102202
|
102203
|
102204
|
102205
|
102206
|
102207
|
102208
|
102209
|
102210
|
102211
|
102253
|
102279
|
102281
|
102308
|
102309
|
102310
|
102311
|
102312
|
102313
|
102314
|
102315
|
102316
|
102317
|
102318
|
102319
|
102320
|
102321
|
102322
|
102323
|
102324
|
102325
|
102326
|
102327
|
102328
|
102329
|
102330
|
102331
|
102358
|
102359
|
102360
|
102361
|
102362
|
102363
|
102364
|
102365
|
102366
|
102367
|
102368
|
102369
|
102370
|
102371
|
102372
|
102373
|
102374
|
102375
|
102376
|
102377
|
102378
|
102379
|
102380
|
102381
|
102382
|
102383
|
102384
|
102385
|
102386