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

(-)a/Koha/Schema/Result/Suggestion.pm (-2 / +2 lines)
Lines 136-142 is the suggestion archived? Link Here
136
136
137
note entered on the suggestion
137
note entered on the suggestion
138
138
139
=head2 privatenote
139
=head2 staff_note
140
140
141
  data_type: 'longtext'
141
  data_type: 'longtext'
142
  is_nullable: 1
142
  is_nullable: 1
Lines 333-339 __PACKAGE__->add_columns( Link Here
333
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
333
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
334
  "note",
334
  "note",
335
  { data_type => "longtext", is_nullable => 1 },
335
  { data_type => "longtext", is_nullable => 1 },
336
  "privatenote",
336
  "staff_note",
337
  { data_type => "longtext", is_nullable => 1 },
337
  { data_type => "longtext", is_nullable => 1 },
338
  "author",
338
  "author",
339
  { data_type => "varchar", is_nullable => 1, size => 80 },
339
  { data_type => "varchar", is_nullable => 1, size => 80 },
(-)a/Koha/Suggestion.pm (-1 / +1 lines)
Lines 160-166 sub to_api_mapping { Link Here
160
        lastmodificationby   => 'last_status_change_by',
160
        lastmodificationby   => 'last_status_change_by',
161
        STATUS               => 'status',
161
        STATUS               => 'status',
162
        note                 => 'note',
162
        note                 => 'note',
163
        privatenote          => 'privatenote',
163
        staff_note           => 'staff_note',
164
        author               => 'author',
164
        author               => 'author',
165
        title                => 'title',
165
        title                => 'title',
166
        copyrightdate        => 'copyright_date',
166
        copyrightdate        => 'copyright_date',
(-)a/admin/columns_settings.yml (-2 / +2 lines)
Lines 191-199 modules: Link Here
191
            -
191
            -
192
              columnname: library_fund
192
              columnname: library_fund
193
            -
193
            -
194
              columnname: suggestion_status
194
              columnname: staff_note
195
            -
195
            -
196
              columnname: privatenote
196
              columnname: suggestion_status
197
            -
197
            -
198
              columnname: actions
198
              columnname: actions
199
              cannot_be_toggled: 1
199
              cannot_be_toggled: 1
(-)a/api/v1/swagger/definitions/suggestion.yaml (-1 / +1 lines)
Lines 75-81 properties: Link Here
75
      - string
75
      - string
76
      - "null"
76
      - "null"
77
    description: note entered on the suggestion
77
    description: note entered on the suggestion
78
  privatenote:
78
  staff_note:
79
    type:
79
    type:
80
      - string
80
      - string
81
      - "null"
81
      - "null"
(-)a/installer/data/mysql/atomicupdate/bug_31374.pl (-4 / +4 lines)
Lines 2-20 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "31374",
4
    bug_number => "31374",
5
    description => "Add a non-public note cololumn to the suggestions table",
5
    description => "Add a non-public note collumn to the suggestions table",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        if( !column_exists( 'suggestions', 'privatenote' ) ) {
9
        if( !column_exists( 'suggestions', 'staff_note' ) ) {
10
            $dbh->do(q{
10
            $dbh->do(q{
11
                    ALTER TABLE suggestions
11
                    ALTER TABLE suggestions
12
                    ADD COLUMN privatenote longtext NULL DEFAULT NULL
12
                    ADD COLUMN staff_note longtext NULL DEFAULT NULL
13
                    COMMENT "suggestions table non-public note"
13
                    COMMENT "suggestions table non-public note"
14
                    AFTER note
14
                    AFTER note
15
            });
15
            });
16
        }
16
        }
17
        # Print useful stuff here
17
        # Print useful stuff here
18
        say $out "Add privatenote column to suggestions table";
18
        say $out "Add staff_note column to suggestions table";
19
    },
19
    },
20
};
20
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 5175-5181 CREATE TABLE `suggestions` ( Link Here
5175
  `STATUS` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'suggestion status (ASKED, CHECKED, ACCEPTED, REJECTED, ORDERED, AVAILABLE or a value from the SUGGEST_STATUS authorised value category)',
5175
  `STATUS` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'suggestion status (ASKED, CHECKED, ACCEPTED, REJECTED, ORDERED, AVAILABLE or a value from the SUGGEST_STATUS authorised value category)',
5176
  `archived` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'is the suggestion archived?',
5176
  `archived` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'is the suggestion archived?',
5177
  `note` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'note entered on the suggestion',
5177
  `note` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'note entered on the suggestion',
5178
  `privatenote` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'non-public note entered on the suggestion',
5178
  `staff_note` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'non-public note entered on the suggestion',
5179
  `author` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'author of the suggested item',
5179
  `author` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'author of the suggested item',
5180
  `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'title of the suggested item',
5180
  `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'title of the suggested item',
5181
  `copyrightdate` smallint(6) DEFAULT NULL COMMENT 'copyright date of the suggested item',
5181
  `copyrightdate` smallint(6) DEFAULT NULL COMMENT 'copyright date of the suggested item',
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-8 / +7 lines)
Lines 185-194 Link Here
185
                                    [% note | html %]
185
                                    [% note | html %]
186
                                </li>
186
                                </li>
187
                            [% END %]
187
                            [% END %]
188
                            [% IF ( privatenote ) %]
188
                            [% IF ( staff_note ) %]
189
                                <li>
189
                                <li>
190
                                    <span class="label">Notes:</span>
190
                                    <span class="label">Notes:</span>
191
                                    [% privatenote | html %]
191
                                    [% staff_note | html %]
192
                                </li>
192
                                </li>
193
                            [% END %]
193
                            [% END %]
194
                        </ol>
194
                        </ol>
Lines 417-423 Link Here
417
                        </li>
417
                        </li>
418
                        <li>
418
                        <li>
419
                            <label for="note">Non-public notes:</label>
419
                            <label for="note">Non-public notes:</label>
420
                            <textarea name="privatenote" id="privatenote" rows="5" cols="40">[% privatenote | html %]</textarea>
420
                            <textarea name="staff_note" id="staff_note" rows="5" cols="40">[% staff_note | html %]</textarea>
421
                        </li>
421
                        </li>
422
                    </ol>
422
                    </ol>
423
                </fieldset>
423
                </fieldset>
Lines 753-760 Link Here
753
                                            <th>Last updated</th>
753
                                            <th>Last updated</th>
754
                                            <th>Library</th>
754
                                            <th>Library</th>
755
                                            <th>Fund</th>
755
                                            <th>Fund</th>
756
                                            <th>Status</th>
757
                                            <th>Non-public note</th>
756
                                            <th>Non-public note</th>
757
                                            <th>Status</th>
758
                                            <th class="NoSort noExport">&nbsp;</th>
758
                                            <th class="NoSort noExport">&nbsp;</th>
759
                                        </tr>
759
                                        </tr>
760
                                    </thead>
760
                                    </thead>
Lines 832-837 Link Here
832
                                                <td>
832
                                                <td>
833
                                                    [% s.fund.budget_name | html %]
833
                                                    [% s.fund.budget_name | html %]
834
                                                </td>
834
                                                </td>
835
                                                <td>
836
                                                    [% s.staff_note | html %]
837
                                                </td>
835
                                                <td>
838
                                                <td>
836
                                                    [% IF s.STATUS == 'ASKED' %]
839
                                                    [% IF s.STATUS == 'ASKED' %]
837
                                                        <span>Pending</span>
840
                                                        <span>Pending</span>
Lines 855-863 Link Here
855
                                                        <br />([% s.reason | html %])
858
                                                        <br />([% s.reason | html %])
856
                                                    [% END %]
859
                                                    [% END %]
857
                                                </td>
860
                                                </td>
858
                                                <td>
859
                                                    [% s.privatenote | html %]
860
                                                </td>
861
                                                <td class="actions">
861
                                                <td class="actions">
862
                                                    <div class="btn-group dropup">
862
                                                    <div class="btn-group dropup">
863
                                                        <a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% s.suggestionid | html %]&amp;op=edit"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% s.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a>
863
                                                        <a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% s.suggestionid | html %]&amp;op=edit"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% s.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a>
864
- 

Return to bug 31374