Bug 23123 - Status AVAILABLE and ORDERED for suggestions are not translated in the templates
Summary: Status AVAILABLE and ORDERED for suggestions are not translated in the templates
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-14 13:10 UTC by Katrin Fischer
Modified: 2021-06-14 21:28 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00


Attachments
Bug 23123: Add missing suggestion status to template for translation (2.18 KB, patch)
2019-07-13 09:33 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23123: Add missing suggestion status to template for translation (2.34 KB, patch)
2019-10-02 12:24 UTC, Claudie Trégouët
Details | Diff | Splinter Review
Bug 23123: Add missing suggestion status to template for translation (2.39 KB, patch)
2019-10-03 12:13 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2019-06-14 13:10:24 UTC
We noticed that the status AVAILABLE (suggestion was ordered and received in acq) is not displayed correctly in the suggestions table. I think it's missing in the templates here:

 131           <span class="label">Status:</span>
 132           [% SET status_found = 0 %]
 133           [% IF ( STATUS == 'ASKED' ) %]
 134               Pending
 135               [% SET status_found = 1 %]
 136           [% ELSIF ( STATUS == 'ACCEPTED' ) %]
 137               Accepted
 138               [% SET status_found = 1 %]
 139           [% ELSIF ( STATUS == 'CHECKED' ) %]
 140               Checked
 141               [% SET status_found = 1 %]
 142           [% ELSIF ( STATUS == 'REJECTED' ) %]
 143               Rejected
 144               [% SET status_found = 1 %]
 145           [% ELSE %]
 146               [% FOREACH s IN SuggestionStatuses %]
 147                   [% IF STATUS == s.authorised_value %]
 148                       [% s.lib | html %]
 149                       [% SET status_found = 1 %]
 150                   [% END %]
 151               [% END %]
 152           [% END %]

It shows as AVAILABLE and is not translatable.
Comment 1 Katrin Fischer 2019-06-14 13:11:06 UTC
ORDERED is missing as well.
Comment 2 Katrin Fischer 2019-06-14 13:13:09 UTC
This part of the code looks incomplete as well:

 506                 <td>
 507                     [% IF ( suggestions_loo.ASKED ) %]
 508                         Pending
 509                     [% ELSIF ( suggestions_loo.ACCEPTED ) %]
 510                         Accepted
 511                     [% ELSIF ( suggestions_loo.ORDERED ) %]
 512                         Ordered
 513                     [% ELSIF ( suggestions_loo.REJECTED ) %]
 514                         Rejected
 515                     [% ELSIF ( suggestions_loo.CHECKED ) %]
 516                         Checked
 517                     [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
 518                         [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
 519                     [% ELSE %]
 520                         Status unknown
 521                     [% END %]
 522 
 523                     [% IF ( suggestions_loo.reason ) %]
 524                         <br />([% suggestions_loo.reason | html %])
 525                     [% END %]
 526                 </td>
Comment 3 Katrin Fischer 2019-07-13 09:33:17 UTC
Created attachment 91514 [details] [review]
Bug 23123: Add missing suggestion status to template for translation

This completes suggestion status options in the templates in 2 places
so all values can be translated and show correctly.

To test:
- Create 2 suggestions
- Accept them
- Create a basket and order those 2 from suggestions
- Close the basket
- Receive shipment and receive one of the 2 suggestions
- Go back to suggestions:
  - Look at the status column in the suggestions table for both
  - Verify that it shows AVAILABLE
  - View both suggestions
  - Verify that the Status: is empty
- Apply patch
- Repeat test from above, it should all show nicely now
Comment 4 Claudie Trégouët 2019-10-02 12:24:19 UTC
Created attachment 93444 [details] [review]
Bug 23123: Add missing suggestion status to template for translation

This completes suggestion status options in the templates in 2 places
so all values can be translated and show correctly.

To test:
- Create 2 suggestions
- Accept them
- Create a basket and order those 2 from suggestions
- Close the basket
- Receive shipment and receive one of the 2 suggestions
- Go back to suggestions:
  - Look at the status column in the suggestions table for both
  - Verify that it shows AVAILABLE
  - View both suggestions
  - Verify that the Status: is empty
- Apply patch
- Repeat test from above, it should all show nicely now

Signed-off-by: Claudie Trégouët <claudie.tregouet@biblibre.com>
Comment 5 Katrin Fischer 2019-10-02 12:36:13 UTC
Thank you, Claudie!
Comment 6 Nick Clemens 2019-10-03 12:13:22 UTC
Created attachment 93582 [details] [review]
Bug 23123: Add missing suggestion status to template for translation

This completes suggestion status options in the templates in 2 places
so all values can be translated and show correctly.

To test:
- Create 2 suggestions
- Accept them
- Create a basket and order those 2 from suggestions
- Close the basket
- Receive shipment and receive one of the 2 suggestions
- Go back to suggestions:
  - Look at the status column in the suggestions table for both
  - Verify that it shows AVAILABLE
  - View both suggestions
  - Verify that the Status: is empty
- Apply patch
- Repeat test from above, it should all show nicely now

Signed-off-by: Claudie Trégouët <claudie.tregouet@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Martin Renvoize 2019-10-07 13:10:30 UTC
Nice work!

Pushed to master for 19.11.00