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 4415-4420 CREATE TABLE return_claims ( Link Here
4415
    CONSTRAINT `rc_resolved_by_ibfk` FOREIGN KEY (`resolved_by`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE
4415
    CONSTRAINT `rc_resolved_by_ibfk` FOREIGN KEY (`resolved_by`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE
4416
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4416
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4417
4417
4418
--
4419
-- Table structure for table `problem_reports`
4420
--
4421
4422
DROP TABLE IF EXISTS `problem_reports`;
4423
CREATE TABLE `problem_reports` (
4424
    `reportid` int(11) NOT NULL auto_increment, -- unqiue identifier assigned by Koha
4425
    `title` varchar(40) NOT NULL default '', -- report subject line
4426
    `content` varchar(255) NOT NULL default '', -- report message content
4427
    `borrowernumber` int(11) default NULL, -- the user who created the problem report
4428
    `branchcode` varchar(10) NOT NULL default '', -- borrower's branch
4429
    `username` varchar(75) default NULL, -- OPAC username
4430
    `problempage` varchar(255) default NULL, -- page the user triggered the problem report form from
4431
    `recipient` enum('admin','library') NOT NULL default 'library', -- the 'to-address' of the problem report
4432
    `reportdate` datetime default NULL, -- date and time of report submission
4433
    `status` varchar(1) NOT NULL default 'N', -- status of the report. N=new, V=viewed, C=closed
4434
    PRIMARY KEY (`reportid`),
4435
    CONSTRAINT `problem_reports_ibfk1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
4436
    CONSTRAINT `problem_reports_ibfk2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
4437
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4438
4418
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4439
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4419
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4440
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4420
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
4441
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 422-427 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
422
('opacreadinghistory','1','','If ON, enables display of Patron Circulation History in OPAC','YesNo'),
422
('opacreadinghistory','1','','If ON, enables display of Patron Circulation History in OPAC','YesNo'),
423
('OpacRenewalAllowed','0',NULL,'If ON, users can renew their issues directly from their OPAC account','YesNo'),
423
('OpacRenewalAllowed','0',NULL,'If ON, users can renew their issues directly from their OPAC account','YesNo'),
424
('OpacRenewalBranch','checkoutbranch','itemhomebranch|patronhomebranch|checkoutbranch|null','Choose how the branch for an OPAC renewal is recorded in statistics','Choice'),
424
('OpacRenewalBranch','checkoutbranch','itemhomebranch|patronhomebranch|checkoutbranch|null','Choose how the branch for an OPAC renewal is recorded in statistics','Choice'),
425
('OPACReportProblem', 0, NULL, 'Allow patrons to submit problem reports for OPAC pages to the library or Koha Administrator', 'YesNo'),
425
('OpacResetPassword','0','','Shows the ''Forgot your password?'' link in the OPAC','YesNo'),
426
('OpacResetPassword','0','','Shows the ''Forgot your password?'' link in the OPAC','YesNo'),
426
('OPACResultsLibrary', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice'),
427
('OPACResultsLibrary', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice'),
427
('OPACResultsSidebar','','70|10','Define HTML to be included on the search results page, underneath the facets sidebar','Textarea'),
428
('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 370-375 OPAC: Link Here
370
                  top: "top"
370
                  top: "top"
371
                  footer: "only footer"
371
                  footer: "only footer"
372
    Features:
372
    Features:
373
        -
374
            - pref: OPACReportProblem
375
              choices:
376
                  yes: Allow
377
                  no: "Don't allow"
378
            - patrons to submit problem reports for OPAC pages to the library or Koha Administrator.
373
        -
379
        -
374
            - pref: opacuserlogin
380
            - pref: opacuserlogin
375
              choices:
381
              choices:
376
- 

Return to bug 4461