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 6287-6292 CREATE TABLE `ticket_updates` ( Link Here
6287
  `public` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'boolean flag to denote whether this update is public',
6287
  `public` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'boolean flag to denote whether this update is public',
6288
  `date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date and time this update was logged',
6288
  `date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date and time this update was logged',
6289
  `message` text NOT NULL COMMENT 'update message content',
6289
  `message` text NOT NULL COMMENT 'update message content',
6290
  `status` varchar(80) DEFAULT NULL COMMENT 'status of ticket at this update',
6290
  PRIMARY KEY (`id`),
6291
  PRIMARY KEY (`id`),
6291
  KEY `ticket_updates_ibfk_1` (`ticket_id`),
6292
  KEY `ticket_updates_ibfk_1` (`ticket_id`),
6292
  KEY `ticket_updates_ibfk_2` (`user_id`),
6293
  KEY `ticket_updates_ibfk_2` (`user_id`),
Lines 6309-6314 CREATE TABLE `tickets` ( Link Here
6309
  `reported_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date and time this ticket was reported',
6310
  `reported_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date and time this ticket was reported',
6310
  `title` text NOT NULL COMMENT 'ticket title',
6311
  `title` text NOT NULL COMMENT 'ticket title',
6311
  `body` text NOT NULL COMMENT 'ticket details',
6312
  `body` text NOT NULL COMMENT 'ticket details',
6313
  `status` varchar(80) DEFAULT NULL COMMENT 'current status of the ticket',
6312
  `resolver_id` int(11) DEFAULT NULL COMMENT 'id of the user who resolved the ticket',
6314
  `resolver_id` int(11) DEFAULT NULL COMMENT 'id of the user who resolved the ticket',
6313
  `resolved_date` datetime DEFAULT NULL COMMENT 'date and time this ticket was resolved',
6315
  `resolved_date` datetime DEFAULT NULL COMMENT 'date and time this ticket was resolved',
6314
  `biblio_id` int(11) DEFAULT NULL COMMENT 'id of biblio linked',
6316
  `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