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

(-)a/installer/data/mysql/atomicupdate/bug_35628.pl (+34 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "35626",
5
    description => "Add statuses to catalog concerns",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
        unless ( column_exists( 'tickets', 'status' ) ) {
10
            $dbh->do(
11
                q{
12
                ALTER TABLE tickets ADD COLUMN status varchar(80) DEFAULT NULL COMMENT 'current status of the ticket' AFTER body
13
            }
14
            );
15
16
            say $out "Added column 'tickets.status'";
17
        }
18
        unless ( column_exists( 'ticket_updates', 'status' ) ) {
19
            $dbh->do(
20
                q{
21
                ALTER TABLE ticket_updates ADD COLUMN status varchar(80) DEFAULT NULL COMMENT 'status of ticket at this update' AFTER message
22
            }
23
            );
24
25
            say $out "Added column 'ticket_updates.status'";
26
        }
27
        $dbh->do(
28
            q{
29
            INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) VALUES ('TICKET_STATUS', 1);
30
        }
31
        );
32
        say $out "Added TICKET_STATUS authorised value category";
33
    },
34
};
(-)a/installer/data/mysql/kohastructure.sql (+2 lines)
Lines 6309-6314 CREATE TABLE `ticket_updates` ( Link Here
6309
  `public` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'boolean flag to denote whether this update is public',
6309
  `public` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'boolean flag to denote whether this update is public',
6310
  `date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date and time this update was logged',
6310
  `date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date and time this update was logged',
6311
  `message` text NOT NULL COMMENT 'update message content',
6311
  `message` text NOT NULL COMMENT 'update message content',
6312
  `status` varchar(80) DEFAULT NULL COMMENT 'status of ticket at this update',
6312
  PRIMARY KEY (`id`),
6313
  PRIMARY KEY (`id`),
6313
  KEY `ticket_updates_ibfk_1` (`ticket_id`),
6314
  KEY `ticket_updates_ibfk_1` (`ticket_id`),
6314
  KEY `ticket_updates_ibfk_2` (`user_id`),
6315
  KEY `ticket_updates_ibfk_2` (`user_id`),
Lines 6331-6336 CREATE TABLE `tickets` ( Link Here
6331
  `reported_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date and time this ticket was reported',
6332
  `reported_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date and time this ticket was reported',
6332
  `title` text NOT NULL COMMENT 'ticket title',
6333
  `title` text NOT NULL COMMENT 'ticket title',
6333
  `body` text NOT NULL COMMENT 'ticket details',
6334
  `body` text NOT NULL COMMENT 'ticket details',
6335
  `status` varchar(80) DEFAULT NULL COMMENT 'current status of the ticket',
6334
  `resolver_id` int(11) DEFAULT NULL COMMENT 'id of the user who resolved the ticket',
6336
  `resolver_id` int(11) DEFAULT NULL COMMENT 'id of the user who resolved the ticket',
6335
  `resolved_date` datetime DEFAULT NULL COMMENT 'date and time this ticket was resolved',
6337
  `resolved_date` datetime DEFAULT NULL COMMENT 'date and time this ticket was resolved',
6336
  `biblio_id` int(11) DEFAULT NULL COMMENT 'id of biblio linked',
6338
  `biblio_id` int(11) DEFAULT NULL COMMENT 'id of biblio linked',
(-)a/installer/data/mysql/mandatory/auth_val_cat.sql (+5 lines)
Lines 95-97 VALUES Link Here
95
    ('ERM_DATABASE_REPORTS_METRICS', 1),
95
    ('ERM_DATABASE_REPORTS_METRICS', 1),
96
    ('ERM_TITLE_REPORTS_METRICS', 1),
96
    ('ERM_TITLE_REPORTS_METRICS', 1),
97
    ('ERM_ITEM_REPORTS_METRICS', 1);
97
    ('ERM_ITEM_REPORTS_METRICS', 1);
98
99
-- For ticket statuses
100
INSERT IGNORE INTO authorised_value_categories (category_name, is_system)
101
VALUES
102
    ('TICKET_STATUS', 1);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt (-1 / +2 lines)
Lines 515-520 Link Here
515
            <p>A list of additional custom status values for suggestions that can be used in addition to the default values.</p>
515
            <p>A list of additional custom status values for suggestions that can be used in addition to the default values.</p>
516
        [% CASE 'TERM' %]
516
        [% CASE 'TERM' %]
517
            <p>Terms to be used in Course Reserves module. Enter terms that will show in the drop down menu when setting up a Course reserve. (For example: Spring, Summer, Winter, Fall).</p>
517
            <p>Terms to be used in Course Reserves module. Enter terms that will show in the drop down menu when setting up a Course reserve. (For example: Spring, Summer, Winter, Fall).</p>
518
        [% CASE 'TICKET_STATUS' %]
519
            <p>A list of custom status values for tickets that can be used in addition to the default values of "New" and "Resolved".</p>
518
        [% CASE 'UPLOAD' %]
520
        [% CASE 'UPLOAD' %]
519
            <p>Categories to be assigned to file uploads. Without a category an upload is considered temporary and may be removed during automated cleanup.</p>
521
            <p>Categories to be assigned to file uploads. Without a category an upload is considered temporary and may be removed during automated cleanup.</p>
520
        [% CASE 'VENDOR_TYPE' %]
522
        [% CASE 'VENDOR_TYPE' %]
521
- 

Return to bug 35628