Bug 15922 - Show authorized value description in staff client search results for lost, withdrawn, and damaged
Summary: Show authorized value description in staff client search results for lost, wi...
Status: Pushed to Master
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Nick Clemens
URL:
Whiteboard:
Keywords:
: 14235 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-02-26 02:10 UTC by Owen Leonard
Modified: 2018-05-16 18:33 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Show the library's description for variations of "Lost," "Damaged," and "Withdrawn" statuses which have been defined in Koha's authorized values.


Attachments
Bug 15922 - Show authorized value description in staff client search results for lost, withdrawn, and damaged (3.30 KB, patch)
2016-02-26 02:16 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 15922 - Show authorized value description in staff client search results for lost, withdrawn, and damaged (3.44 KB, patch)
2016-02-26 14:52 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15922 - Show authorized value description in staff client search results for lost, withdrawn, and damaged (3.26 KB, patch)
2018-04-20 10:51 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 15922: Show authorized value description in staff client search results for lost, withdrawn, and damaged (3.26 KB, patch)
2018-04-20 10:52 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 Owen Leonard 2016-02-26 02:10:56 UTC
The staff client search results table doesn't show actual authorized value descriptions for items with a lost, damaged, or withdrawn status. Instead it shows "Lost," "Damaged," or "Withdrawn" for any values of those statuses.
Comment 1 Owen Leonard 2016-02-26 02:16:18 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-02-26 14:52:05 UTC
Created attachment 48402 [details] [review]
Bug 15922 - Show authorized value description in staff client search results for lost, withdrawn, and damaged

If an item in the staff client search results list is lost, withdrawn,
or damaged, the actual authorized value description for each of those
statuses should be displayed rather than the generic term. This patch
adds use of the AuthorisedValues template plugin to output the correct
description.

To test, apply the patch and perform a catalog search in the staff
client which will return results with various values for lost, damaged,
and withdrawn.

Confirm that the correct lost, damaged, or withdrawn status appears for
each item rather than the generic term.

Followed test plan, statuses appear as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Comment 3 Jonathan Druart 2016-03-01 09:12:57 UTC
I am not sure about this patch:
There are some other places where the string is hardcoded, at least:
catalogue/moredetail.tt
 77                 [% IF ( ITEM_DAT.itemlost ) %]Lost[% END %]
 78                 [% IF ( ITEM_DAT.damaged ) %]Damaged[% END %]
 79                 [% IF ( ITEM_DAT.withdrawn ) %]Withdrawn[% END %]

catalogue/detail.tt
 662                         [% IF ( item.withdrawn ) %]
 663                             <span class="wdn">Withdrawn</span>
 664                         [% END %]

And using the AV, the string is no longer translatable.
Comment 4 Owen Leonard 2016-03-01 14:05:05 UTC
(In reply to Jonathan Druart from comment #3)

> There are some other places where the string is hardcoded, at least:

Those sound like issues which could be addressed in other bug reports.

> And using the AV, the string is no longer translatable.

True, but isn't that what we live with every time we use an authorized value?
Comment 5 Jonathan Druart 2016-03-01 14:26:34 UTC
(In reply to Owen Leonard from comment #4)
> (In reply to Jonathan Druart from comment #3)
> 
> > There are some other places where the string is hardcoded, at least:
> 
> Those sound like issues which could be addressed in other bug reports.

I personally think we should fix all of them at the same time.

> > And using the AV, the string is no longer translatable.
> 
> True, but isn't that what we live with every time we use an authorized value?

Yes, but for these 3 ones I am pretty sure everybody keeps the default value.
Comment 6 Owen Leonard 2016-03-01 14:33:57 UTC
(In reply to Jonathan Druart from comment #5)
> I personally think we should fix all of them at the same time.

I'd be happy to submit a follow-up for moredetail.tt and detail.tt.
 
> Yes, but for these 3 ones I am pretty sure everybody keeps the default value.

This bug exists because we use more than just the default value for lost, and damaged and we want to see those locally-defined values. Bug 11280 shows that there was a need for withdrawn to be the same.

> catalogue/detail.tt
>  662                         [% IF ( item.withdrawn ) %]
>  663                             <span class="wdn">Withdrawn</span>
>  664                         [% END %]

catalogue/detail.tt already shows the authorized value description for lost and damaged. That it doesn't do so for withdrawn is a bug which should have been fixed by Bug 11280.
Comment 7 Owen Leonard 2016-06-21 12:45:05 UTC
*** Bug 14235 has been marked as a duplicate of this bug. ***
Comment 8 Katrin Fischer 2016-07-28 09:25:08 UTC
We have a library asking for the exact status in the result lists as well - is there a way to get this moving again?
Comment 9 Owen Leonard 2016-07-28 12:52:32 UTC
I'm happy to pick this up again if there are no objections to my initial approach.
Comment 10 Katrin Fischer 2016-08-01 21:46:11 UTC
In my opinion dealing with the other pages in separate bugs sounds ok, but we should file them now so the missing behaviour is better documented.

As we got libraries differentiating between lost and missing and sometimes using the different status for 'odd' things they need, I can't say they are always left unchanged :)
Comment 11 Fridolin SOMERS 2018-03-06 11:24:12 UTC
(In reply to Owen Leonard from comment #6)
> (In reply to Jonathan Druart from comment #5)
> > I personally think we should fix all of them at the same time.
> 
> I'd be happy to submit a follow-up for moredetail.tt and detail.tt.
>  
> > Yes, but for these 3 ones I am pretty sure everybody keeps the default value.
> 
> This bug exists because we use more than just the default value for lost,
> and damaged and we want to see those locally-defined values. Bug 11280 shows
> that there was a need for withdrawn to be the same.
> 
> > catalogue/detail.tt
> >  662                         [% IF ( item.withdrawn ) %]
> >  663                             <span class="wdn">Withdrawn</span>
> >  664                         [% END %]
> 
> catalogue/detail.tt already shows the authorized value description for lost
> and damaged. That it doesn't do so for withdrawn is a bug which should have
> been fixed by Bug 11280.

I propose Bug 20341 for that.
The idea is to just implement for withdrawn the same behavior as lost and damaged.
Comment 12 Katrin Fischer 2018-03-18 00:34:47 UTC
Fridolin, what's missing here?
Comment 13 Fridolin SOMERS 2018-03-20 10:34:10 UTC
(In reply to Katrin Fischer from comment #12)
> Fridolin, what's missing here?
I'm OK with it.

Jonathan has set in discussion, depends on him.
Comment 14 Jonathan Druart 2018-03-23 14:40:08 UTC
Sending to QA
Comment 15 Nick Clemens 2018-04-20 10:51:32 UTC
Created attachment 74616 [details] [review]
Bug 15922 - Show authorized value description in staff client search results for lost, withdrawn, and damaged

If an item in the staff client search results list is lost, withdrawn,
or damaged, the actual authorized value description for each of those
statuses should be displayed rather than the generic term. This patch
adds use of the AuthorisedValues template plugin to output the correct
description.

To test, apply the patch and perform a catalog search in the staff
client which will return results with various values for lost, damaged,
and withdrawn.

Confirm that the correct lost, damaged, or withdrawn status appears for
each item rather than the generic term.

Followed test plan, statuses appear as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 16 Nick Clemens 2018-04-20 10:52:23 UTC
Created attachment 74617 [details] [review]
Bug 15922: Show authorized value description in staff client search results for lost, withdrawn, and damaged

If an item in the staff client search results list is lost, withdrawn,
or damaged, the actual authorized value description for each of those
statuses should be displayed rather than the generic term. This patch
adds use of the AuthorisedValues template plugin to output the correct
description.

To test, apply the patch and perform a catalog search in the staff
client which will return results with various values for lost, damaged,
and withdrawn.

Confirm that the correct lost, damaged, or withdrawn status appears for
each item rather than the generic term.

Followed test plan, statuses appear as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 17 Jonathan Druart 2018-04-20 15:49:15 UTC
Pushed to master for 18.05, thanks to everybody involved!