Bugzilla – Attachment 99929 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: Database and syspref changes
Bug-4461-Database-and-syspref-changes.patch (text/plain), 7.43 KB, created by
Martin Renvoize (ashimema)
on 2020-03-02 15:22:12 UTC
(
hide
)
Description:
Bug 4461: Database and syspref changes
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-03-02 15:22:12 UTC
Size:
7.43 KB
patch
obsolete
>From 02e6ea0d38f0695a0910da5a77fd48c9e7f46b20 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 10 Feb 2020 00:50:51 +0000 >Subject: [PATCH] Bug 4461: Database and syspref changes > >adding problem_reports table and OPACReportProblem syspref > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > ...ug-4461_add-OPACReportProblem-syspref.perl | 7 ++++++ > .../bug-4461_add-problem-reports-table.perl | 23 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 21 +++++++++++++++++ > installer/data/mysql/sysprefs.sql | 1 + > .../en/modules/admin/preferences/opac.pref | 6 +++++ > 5 files changed, 58 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug-4461_add-OPACReportProblem-syspref.perl > create mode 100644 installer/data/mysql/atomicupdate/bug-4461_add-problem-reports-table.perl > >diff --git a/installer/data/mysql/atomicupdate/bug-4461_add-OPACReportProblem-syspref.perl b/installer/data/mysql/atomicupdate/bug-4461_add-OPACReportProblem-syspref.perl >new file mode 100644 >index 0000000000..4c858b56ea >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug-4461_add-OPACReportProblem-syspref.perl >@@ -0,0 +1,7 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('OPACReportProblem', 0, NULL, 'Allow patrons to submit problem reports for OPAC pages to the library or Koha Administrator', 'YesNo') }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 4461 - Add OPACReportProblem system preference)\n"; >+} >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 >new file mode 100644 >index 0000000000..884c301cd4 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug-4461_add-problem-reports-table.perl >@@ -0,0 +1,23 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{ DROP TABLE IF EXISTS `problem_reports` }); >+ >+ $dbh->do(q{ CREATE TABLE problem_reports ( >+ reportid int(11) NOT NULL auto_increment, -- unqiue 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 >+ branchcode varchar(10) NOT NULL default '', -- borrower's branch >+ 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 >+ 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, >+ CONSTRAINT problem_reports_ibfk2 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 4461: Add problem reports table)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 388cf828aa..22a28bb2b7 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4415,6 +4415,27 @@ CREATE TABLE return_claims ( > CONSTRAINT `rc_resolved_by_ibfk` FOREIGN KEY (`resolved_by`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > >+-- >+-- Table structure for table `problem_reports` >+-- >+ >+DROP TABLE IF EXISTS `problem_reports`; >+CREATE TABLE `problem_reports` ( >+ `reportid` int(11) NOT NULL auto_increment, -- unqiue 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 >+ `branchcode` varchar(10) NOT NULL default '', -- borrower's branch >+ `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 >+ `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, >+ CONSTRAINT `problem_reports_ibfk2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE >+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >+ > /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; > /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; > /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 40f7a4740f..83ff9c15d6 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -422,6 +422,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('opacreadinghistory','1','','If ON, enables display of Patron Circulation History in OPAC','YesNo'), > ('OpacRenewalAllowed','0',NULL,'If ON, users can renew their issues directly from their OPAC account','YesNo'), > ('OpacRenewalBranch','checkoutbranch','itemhomebranch|patronhomebranch|checkoutbranch|null','Choose how the branch for an OPAC renewal is recorded in statistics','Choice'), >+('OPACReportProblem', 0, NULL, 'Allow patrons to submit problem reports for OPAC pages to the library or Koha Administrator', 'YesNo'), > ('OpacResetPassword','0','','Shows the ''Forgot your password?'' link in the OPAC','YesNo'), > ('OPACResultsLibrary', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice'), > ('OPACResultsSidebar','','70|10','Define HTML to be included on the search results page, underneath the facets sidebar','Textarea'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 9c9b2b7f00..52d000d715 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -370,6 +370,12 @@ OPAC: > top: "top" > footer: "only footer" > Features: >+ - >+ - pref: OPACReportProblem >+ choices: >+ yes: Allow >+ no: "Don't allow" >+ - patrons to submit problem reports for OPAC pages to the library or Koha Administrator. > - > - pref: opacuserlogin > choices: >-- >2.20.1
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