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

(-)a/installer/data/mysql/atomicupdate/bug_35628.pl (+28 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(q{
11
                ALTER TABLE tickets ADD COLUMN status varchar(80) DEFAULT NULL COMMENT 'current status of the ticket' AFTER body
12
            });
13
14
            say $out "Added column 'tickets.status'";
15
        }
16
        unless( column_exists('ticket_updates','status') ){
17
            $dbh->do(q{
18
                ALTER TABLE ticket_updates ADD COLUMN status varchar(80) DEFAULT NULL COMMENT 'status of ticket at this update' AFTER message
19
            });
20
21
            say $out "Added column 'ticket_updates.status'";
22
        }
23
        $dbh->do(q{
24
            INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) VALUES ('TICKET_STATUS', 1);
25
        });
26
        say $out "Added TICKET_STATUS authorised value category";
27
    },
28
};
(-)a/installer/data/mysql/kohastructure.sql (+2 lines)
Lines 6270-6275 CREATE TABLE `ticket_updates` ( Link Here
6270
  `public` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'boolean flag to denote whether this update is public',
6270
  `public` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'boolean flag to denote whether this update is public',
6271
  `date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date and time this update was logged',
6271
  `date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date and time this update was logged',
6272
  `message` text NOT NULL COMMENT 'update message content',
6272
  `message` text NOT NULL COMMENT 'update message content',
6273
  `status` varchar(80) DEFAULT NULL COMMENT 'status of ticket at this update',
6273
  PRIMARY KEY (`id`),
6274
  PRIMARY KEY (`id`),
6274
  KEY `ticket_updates_ibfk_1` (`ticket_id`),
6275
  KEY `ticket_updates_ibfk_1` (`ticket_id`),
6275
  KEY `ticket_updates_ibfk_2` (`user_id`),
6276
  KEY `ticket_updates_ibfk_2` (`user_id`),
Lines 6291-6296 CREATE TABLE `tickets` ( Link Here
6291
  `reported_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date and time this ticket was reported',
6292
  `reported_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date and time this ticket was reported',
6292
  `title` text NOT NULL COMMENT 'ticket title',
6293
  `title` text NOT NULL COMMENT 'ticket title',
6293
  `body` text NOT NULL COMMENT 'ticket details',
6294
  `body` text NOT NULL COMMENT 'ticket details',
6295
  `status` varchar(80) DEFAULT NULL COMMENT 'current status of the ticket',
6294
  `resolver_id` int(11) DEFAULT NULL COMMENT 'id of the user who resolved the ticket',
6296
  `resolver_id` int(11) DEFAULT NULL COMMENT 'id of the user who resolved the ticket',
6295
  `resolved_date` datetime DEFAULT NULL COMMENT 'date and time this ticket was resolved',
6297
  `resolved_date` datetime DEFAULT NULL COMMENT 'date and time this ticket was resolved',
6296
  `biblio_id` int(11) DEFAULT NULL COMMENT 'id of biblio linked',
6298
  `biblio_id` int(11) DEFAULT NULL COMMENT 'id of biblio linked',
(-)a/installer/data/mysql/mandatory/auth_val_cat.sql (-1 / +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
- 
98
99
-- For ticket statuses
100
INSERT IGNORE INTO authorised_value_categories (category_name, is_system)
101
VALUES
102
    ('TICKET_STATUS', 1);

Return to bug 35628