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