Bug 31374: (follow-up) change private note to staff_note and reorder columns
authorLucas Gass <lucas@bywatersolutions.com>
Mon, 22 Aug 2022 22:21:22 +0000 (22:21 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 7 Sep 2022 20:32:51 +0000 (13:32 -0700)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Schema/Result/Suggestion.pm
Koha/Suggestion.pm
admin/columns_settings.yml
api/v1/swagger/definitions/suggestion.yaml
installer/data/mysql/atomicupdate/bug_31374.pl
installer/data/mysql/kohastructure.sql
koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt

index f822dc1..edc76ee 100644 (file)
@@ -136,7 +136,7 @@ is the suggestion archived?
 
 note entered on the suggestion
 
-=head2 privatenote
+=head2 staff_note
 
   data_type: 'longtext'
   is_nullable: 1
@@ -333,7 +333,7 @@ __PACKAGE__->add_columns(
   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
   "note",
   { data_type => "longtext", is_nullable => 1 },
-  "privatenote",
+  "staff_note",
   { data_type => "longtext", is_nullable => 1 },
   "author",
   { data_type => "varchar", is_nullable => 1, size => 80 },
index f66f9f9..9d9e460 100644 (file)
@@ -160,7 +160,7 @@ sub to_api_mapping {
         lastmodificationby   => 'last_status_change_by',
         STATUS               => 'status',
         note                 => 'note',
-        privatenote          => 'privatenote',
+        staff_note           => 'staff_note',
         author               => 'author',
         title                => 'title',
         copyrightdate        => 'copyright_date',
index c5ebf56..b535961 100644 (file)
@@ -191,9 +191,9 @@ modules:
             -
               columnname: library_fund
             -
-              columnname: suggestion_status
+              columnname: staff_note
             -
-              columnname: privatenote
+              columnname: suggestion_status
             -
               columnname: actions
               cannot_be_toggled: 1
index 780773b..c0b4b58 100644 (file)
@@ -75,7 +75,7 @@ properties:
       - string
       - "null"
     description: note entered on the suggestion
-  privatenote:
+  staff_note:
     type:
       - string
       - "null"
index 861a71f..80c278e 100755 (executable)
@@ -2,19 +2,19 @@ use Modern::Perl;
 
 return {
     bug_number => "31374",
-    description => "Add a non-public note cololumn to the suggestions table",
+    description => "Add a non-public note collumn to the suggestions table",
     up => sub {
         my ($args) = @_;
         my ($dbh, $out) = @$args{qw(dbh out)};
-        if( !column_exists( 'suggestions', 'privatenote' ) ) {
+        if( !column_exists( 'suggestions', 'staff_note' ) ) {
             $dbh->do(q{
                     ALTER TABLE suggestions
-                    ADD COLUMN privatenote longtext NULL DEFAULT NULL
+                    ADD COLUMN staff_note longtext NULL DEFAULT NULL
                     COMMENT "suggestions table non-public note"
                     AFTER note
             });
         }
         # Print useful stuff here
-        say $out "Add privatenote column to suggestions table";
+        say $out "Add staff_note column to suggestions table";
     },
 };
index 6462f21..b9ec78e 100644 (file)
@@ -5185,7 +5185,7 @@ CREATE TABLE `suggestions` (
   `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)',
   `archived` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'is the suggestion archived?',
   `note` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'note entered on the suggestion',
-  `privatenote` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'non-public note entered on the suggestion',
+  `staff_note` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'non-public note entered on the suggestion',
   `author` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'author of the suggested item',
   `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'title of the suggested item',
   `copyrightdate` smallint(6) DEFAULT NULL COMMENT 'copyright date of the suggested item',
index 0005a32..70640fa 100644 (file)
                                     [% note | html %]
                                 </li>
                             [% END %]
-                            [% IF ( privatenote ) %]
+                            [% IF ( staff_note ) %]
                                 <li>
                                     <span class="label">Notes:</span>
-                                    [% privatenote | html %]
+                                    [% staff_note | html %]
                                 </li>
                             [% END %]
                         </ol>
                         </li>
                         <li>
                             <label for="note">Non-public notes:</label>
-                            <textarea name="privatenote" id="privatenote" rows="5" cols="40">[% privatenote | html %]</textarea>
+                            <textarea name="staff_note" id="staff_note" rows="5" cols="40">[% staff_note | html %]</textarea>
                         </li>
                     </ol>
                 </fieldset>
                                             <th>Last updated</th>
                                             <th>Library</th>
                                             <th>Fund</th>
-                                            <th>Status</th>
                                             <th>Non-public note</th>
+                                            <th>Status</th>
                                             <th class="NoSort noExport">&nbsp;</th>
                                         </tr>
                                     </thead>
                                                     [% s.fund.budget_name | html %]
                                                 </td>
                                                 <td>
+                                                    [% s.staff_note | html %]
+                                                </td>
+                                                <td>
                                                     [% IF s.STATUS == 'ASKED' %]
                                                         <span>Pending</span>
                                                     [% ELSIF s.STATUS == 'ACCEPTED' %]
                                                         <br />([% s.reason | html %])
                                                     [% END %]
                                                 </td>
-                                                <td>
-                                                    [% s.privatenote | html %]
-                                                </td>
                                                 <td class="actions">
                                                     <div class="btn-group dropup">
                                                         <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>