Bug 13588 - Should GetKohaAuthorisedValueLib return lib if lib_opac is empty and opac==1 ?
Summary: Should GetKohaAuthorisedValueLib return lib if lib_opac is empty and opac==1 ?
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-15 12:27 UTC by Marcel de Rooy
Modified: 2020-11-30 21:45 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2015-01-15 12:27:09 UTC
C4/Koha.pm subroutine GetKohaAuthorisedValueLib returns the staff description if there is no opac description. This is the case too if the opac flag is true.

What is the result?
If you do not have an opac description (because you want translated descriptions for item statuses), the staff description is returned (in the only available language used in authorized values). This effectively hides the translated terms in templates.
Example: The item-status include contains the translation for Not for loan, but this is overruled by the staff description in one language.
A similar remark could be made for lost, damaged, restricted.

Workaround:
If you have only e.g. two languages in your opac, you could add both translation in the lib_opac field of authorized values.

Solution:
We could say opac==2 means: do not return the staff description.
Changing the call for itemnotforloan in C4/Items from 1 to 2, would resolve the display on opac-detail for Status.
Each of the 6? calls should however be examined more carefully.
Comment 1 Katrin Fischer 2015-01-18 17:23:45 UTC
I think what you describe is a workaround for a translation issue that should be solved in general - But I agree this is a bigger problem :(

The problem is that the current behaviour has been the default behaviour forever, so people expect it to work that way. The sample data doesn't include OPAC descriptions and also in our libraries only the lib description is set as long as its the same. 

I am not sure we should change this, but if we do, some more thought needs to go into it.
Comment 2 Katrin Fischer 2020-01-06 14:17:32 UTC
GetKohaAuthorisedValueLib is no more and there is 20307 for translations in the future. Closing INVALID because of the change of code since this was filed.