View | Details | Raw Unified | Return to bug 4461
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug-4461_add-OPACReportProblem-syspref.perl (+7 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $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') });
4
5
    SetVersion( $DBversion );
6
    print "Upgrade to $DBversion done (Bug 4461 - Add OPACReportProblem system preference)\n";
7
}
(-)a/installer/data/mysql/atomicupdate/bug-4461_add-problem-reports-table.perl (+23 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{ DROP TABLE IF EXISTS `problem_reports` });
4
5
    $dbh->do(q{ CREATE TABLE problem_reports (
6
        reportid int(11) NOT NULL auto_increment, -- unqiue identifier assigned by Koha
7
        title varchar(40) NOT NULL default '', -- report subject line
8
        content varchar(255) NOT NULL default '', -- report message content
9
        borrowernumber int(11) default NULL, -- the user who created the problem report
10
        branchcode varchar(10) NOT NULL default '', -- borrower's branch
11
        username varchar(75) default NULL, -- OPAC username
12
        problempage varchar(255) default NULL, -- page the user triggered the problem report form from
13
        recipient enum('admin','library') NOT NULL default 'library', -- the 'to-address' of the problem report
14
        reportdate datetime default NULL, -- date and time of report submission
15
        status varchar(1) NOT NULL default 'N', -- status of the report. N=new, V=viewed, C=closed
16
        PRIMARY KEY (reportid),
17
        CONSTRAINT problem_reports_ibfk1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE,
18
        CONSTRAINT problem_reports_ibfk2 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE
19
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci });
20
21
    SetVersion( $DBversion );
22
    print "Upgrade to $DBversion done (Bug 4461: Add problem reports table)\n";
23
}
(-)a/installer/data/mysql/kohastructure.sql (+21 lines)
Lines 4411-4416 CREATE TABLE return_claims ( Link Here
4411
    CONSTRAINT `rc_resolved_by_ibfk` FOREIGN KEY (`resolved_by`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE
4411
    CONSTRAINT `rc_resolved_by_ibfk` FOREIGN KEY (`resolved_by`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE
4412
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4412
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4413
4413
4414
--
4415
-- Table structure for table `problem_reports`
4416
--
4417
4418
DROP TABLE IF EXISTS `problem_reports`;
4419
CREATE TABLE `problem_reports` (
4420
    `reportid` int(11) NOT NULL auto_increment, -- unqiue identifier assigned by Koha
4421
    `title` varchar(40) NOT NULL default '', -- report subject line
4422
    `content` varchar(255) NOT NULL default '', -- report message content
4423
    `borrowernumber` int(11) default NULL, -- the user who created the problem report
4424
    `branchcode` varchar(10) NOT NULL default '', -- borrower's branch
4425
    `username` varchar(75) default NULL, -- OPAC username
4426
    `problempage` varchar(255) default NULL, -- page the user triggered the problem report form from
4427
    `recipient` enum('admin','library') NOT NULL default 'library', -- the 'to-address' of the problem report
4428
    `reportdate` datetime default NULL, -- date and time of report submission
4429
    `status` varchar(1) NOT NULL default 'N', -- status of the report. N=new, V=viewed, C=closed
4430
    PRIMARY KEY (`reportid`),
4431
    CONSTRAINT `problem_reports_ibfk1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
4432
    CONSTRAINT `problem_reports_ibfk2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
4433
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4434
4414
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4435
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4415
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4436
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4416
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
4437
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 421-426 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
421
('opacreadinghistory','1','','If ON, enables display of Patron Circulation History in OPAC','YesNo'),
421
('opacreadinghistory','1','','If ON, enables display of Patron Circulation History in OPAC','YesNo'),
422
('OpacRenewalAllowed','0',NULL,'If ON, users can renew their issues directly from their OPAC account','YesNo'),
422
('OpacRenewalAllowed','0',NULL,'If ON, users can renew their issues directly from their OPAC account','YesNo'),
423
('OpacRenewalBranch','checkoutbranch','itemhomebranch|patronhomebranch|checkoutbranch|null','Choose how the branch for an OPAC renewal is recorded in statistics','Choice'),
423
('OpacRenewalBranch','checkoutbranch','itemhomebranch|patronhomebranch|checkoutbranch|null','Choose how the branch for an OPAC renewal is recorded in statistics','Choice'),
424
('OPACReportProblem', 0, NULL, 'Allow patrons to submit problem reports for OPAC pages to the library or Koha Administrator', 'YesNo'),
424
('OpacResetPassword','0','','Shows the ''Forgot your password?'' link in the OPAC','YesNo'),
425
('OpacResetPassword','0','','Shows the ''Forgot your password?'' link in the OPAC','YesNo'),
425
('OPACResultsLibrary', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice'),
426
('OPACResultsLibrary', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice'),
426
('OPACResultsSidebar','','70|10','Define HTML to be included on the search results page, underneath the facets sidebar','Textarea'),
427
('OPACResultsSidebar','','70|10','Define HTML to be included on the search results page, underneath the facets sidebar','Textarea'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-1 / +6 lines)
Lines 377-382 OPAC: Link Here
377
                  footer: "only footer"
377
                  footer: "only footer"
378
    Features:
378
    Features:
379
        -
379
        -
380
            - pref: OPACReportProblem
381
              choices:
382
                  yes: Allow
383
                  no: "Don't allow"
384
            - patrons to submit problem reports for OPAC pages to the library or Koha Administrator.
385
        -
380
            - pref: opacuserlogin
386
            - pref: opacuserlogin
381
              choices:
387
              choices:
382
                  yes: Allow
388
                  yes: Allow
383
- 

Return to bug 4461