Bug 21883 - Show authorized value description for withdrawn in check-in
Summary: Show authorized value description for withdrawn in check-in
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on: 26323
Blocks:
  Show dependency treegraph
 
Reported: 2018-11-26 14:35 UTC by Fridolin Somers
Modified: 2021-05-24 16:22 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
This adds the description of the withdrawn status to the message that is displayed when a withdrawn item is returned.
Version(s) released in:
21.05.00,20.11.06


Attachments
Bug 21883: Show authorized value description for withdrawn in check-in (2.89 KB, patch)
2018-11-26 14:40 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 21883: Show authorized value description for withdrawn in check-in (2.95 KB, patch)
2018-11-30 20:05 UTC, Pierre-Marc Thibault
Details | Diff | Splinter Review
Bug 21883: Pass the item to the template (8.48 KB, patch)
2020-10-01 12:59 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 21883: AddShow authorized value description for withdrawn in check-in (2.73 KB, patch)
2020-10-01 13:00 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 21883: Pass the item to the template (8.48 KB, patch)
2021-03-04 13:07 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 21883: Show authorized value description for withdrawn in check-in (2.96 KB, patch)
2021-03-04 13:07 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 21883: Pass the item to the template (8.54 KB, patch)
2021-03-08 10:37 UTC, David Nind
Details | Diff | Splinter Review
Bug 21883: Show authorized value description for withdrawn in check-in (3.01 KB, patch)
2021-03-08 10:37 UTC, David Nind
Details | Diff | Splinter Review
Bug 21883: Pass the item to the template (8.59 KB, patch)
2021-04-17 14:50 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21883: Show authorized value description for withdrawn in check-in (3.06 KB, patch)
2021-04-17 14:50 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2018-11-26 14:35:30 UTC
During check-in (circ/returns.pl) the withdrawn information may be displayed in a message :
"Item is withdrawn".

Like Bug 21877 we should display the withdrawn authorized value description during check-in.
Comment 1 Fridolin Somers 2018-11-26 14:40:32 UTC
Created attachment 82648 [details] [review]
Bug 21883: Show authorized value description for withdrawn in check-in

During check-in (circ/returns.pl) the withdrawn information may be displayed in a message :
"Item is withdrawn".

Like Bug 21877 we should display the withdrawn authorized value description during check-in.

This patch adds this display.
Add <span> for easier translation.
Also adds class 'ci-withdrawn' to ease hidding this new information via CSS.

Test plan :
1) On a catalog with items.withdrawn defined with authorized values category WITHDRAWN
2) Define in WITHDRAWN an authorized values 1 with description 'dropped in trash'
3) Define in WITHDRAWN an authorized values 2 with description empty
4) Check-out an item
5) Edit this item with withdrawn=1
6) Check-in this item => You see 'Item is withdrawn (dropped in trash)'
7) Edit this item with withdrawn=2
8) Check-in this item => You see 'Item is withdrawn'
Comment 2 Fridolin Somers 2018-11-26 14:47:34 UTC
Oh be sure syspref BlockReturnOfWithdrawnItems is 'Block'
Comment 3 Pierre-Marc Thibault 2018-11-30 20:05:10 UTC
Created attachment 82810 [details] [review]
Bug 21883: Show authorized value description for withdrawn in check-in

During check-in (circ/returns.pl) the withdrawn information may be displayed in a message :
"Item is withdrawn".

Like Bug 21877 we should display the withdrawn authorized value description during check-in.

This patch adds this display.
Add <span> for easier translation.
Also adds class 'ci-withdrawn' to ease hidding this new information via CSS.

Test plan :
1) On a catalog with items.withdrawn defined with authorized values category WITHDRAWN
2) Define in WITHDRAWN an authorized values 1 with description 'dropped in trash'
3) Define in WITHDRAWN an authorized values 2 with description empty
4) Check-out an item
5) Edit this item with withdrawn=1
6) Check-in this item => You see 'Item is withdrawn (dropped in trash)'
7) Edit this item with withdrawn=2
8) Check-in this item => You see 'Item is withdrawn'

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Comment 4 Jonathan Druart 2018-12-05 22:13:01 UTC
Pass the item object to the template instead.
Comment 5 Martin Renvoize 2020-10-01 12:59:41 UTC
Created attachment 111037 [details] [review]
Bug 21883: Pass the item to the template

This patch update the controller to pass a full item object to the
template instead of a subset of item fields and updates the template to
utilise the object.
Comment 6 Martin Renvoize 2020-10-01 13:00:05 UTC
Created attachment 111038 [details] [review]
Bug 21883: AddShow authorized value description for withdrawn in check-in

During check-in (circ/returns.pl) the withdrawn information may be
displayed in a message :
"Item is withdrawn".

Like Bug 21877 we should display the withdrawn authorized value
Description during check-in.

This patch adds this display.
Add <span> for easier translation.
Also adds class 'ci-withdrawn' to ease hidding this new information
via CSS.

Test plan :
1) On a catalog with items.withdrawn defined with authorized values
   category WITHDRAWN
2) Define in WITHDRAWN an authorized values 1 with description
  'dropped in trash'
3) Define in WITHDRAWN an authorized values 2 with description
   empty
4) Check-out an item
5) Edit this item with withdrawn=1
6) Check-in this item => You see 'Item is withdrawn (dropped
   in trash)'
7) Edit this item with withdrawn=2
8) Check-in this item => You see 'Item is withdrawn'
Comment 7 Martin Renvoize 2020-10-01 13:01:05 UTC
Adopted.. Patche reworked as requested.
Comment 8 David Nind 2020-10-01 21:23:25 UTC
Hi Martin.

I struggled with this one, maybe my brain isn't working this morning 8-) :

1. I edited the values in WITHDRAWN to:
   Dropped in trash => assigned to authorised value 1
   (empty) => description left blank for authorized value 2

2. When you edit an item's withdrawal status you get a drop down list of:
   (blank) <= it is blank, it doesn't display as (blank)
   Dropped in trash
   I guess making it blank is just for testing, not sure why you would in real life.

3. The values in the drop down list wrap around rather than the drop down list getting wider to accommodate the width of the description.

4. The message displayed when checking in an item with a withdrawal status where the description is blank - it displays the authorized value in brackets in a ci-withdrawn class:
  . Item is withdrawn. (2)

As per 4 above, I don't get the behaviour in test plan step 8.

Other notes for myself:
- BlockReturnOfWithdrawnItems: enable sor disables items withdrawn for m being checked in
- In the staff interface and the OPAC the description for the withdrawn value is shown in various places. If the withdrawn authorized value description or OPAC description are empty, it shows as:
  . Staff interface - withdrawn status column when you have selected edit items for a record: 2
  . OPAC - status column in the OPAC view of the record: 2
  . OPAC - MARC view, withdrawn status column for list of items: (blank)
Comment 9 Katrin Fischer 2020-10-18 16:56:56 UTC
Was checkign this one for Academy, but doesn't apply right now (see also previous comment from David)

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 21883: Pass the item to the template
Applying: Bug 21883: AddShow authorized value description for withdrawn in check-in
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt).
error: could not build fake ancestor
Patch failed at 0001 Bug 21883: AddShow authorized value description for withdrawn in check-in
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-21883-AddShow-authorized-value-description-for-SKAaMC.patch
Comment 10 Fridolin Somers 2021-03-04 13:07:00 UTC
Created attachment 117719 [details] [review]
Bug 21883: Pass the item to the template

This patch update the controller to pass a full item object to the
template instead of a subset of item fields and updates the template to
utilise the object.
Comment 11 Fridolin Somers 2021-03-04 13:07:30 UTC
Created attachment 117720 [details] [review]
Bug 21883: Show authorized value description for withdrawn in check-in

During check-in (circ/returns.pl) the withdrawn information may be
displayed in a message :
"Item is withdrawn".

Like Bug 21877 we should display the withdrawn authorized value description during check-in.

This patch adds this display.

Text changed in order to look maximum like in checkout :
https://git.koha-community.org/Koha-community/Koha/src/commit/a57278f39b8c5b7a82b21671f266dbf32e2d41a0/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt#L368
Uses class 'ci-withdrawn' to ease hidding this new information via CSS.

Test plan :
1) On a catalog with items.withdrawn defined with authorized values
   category WITHDRAWN
2) Define in WITHDRAWN an authorized values 1 with description
  'dropped in trash'
3) Define in WITHDRAWN an authorized values 2 with description
   empty
4) Check-out an item
5) Edit this item with withdrawn=1
6) Check-in this item => You see 'Item has been withdrawn (dropped
   in trash)'
7) Edit this item with withdrawn=2
8) Check-in this item => You see 'Item has been withdrawn'
Comment 12 David Nind 2021-03-05 19:39:15 UTC
Sorry Fridolin, I was too slow retesting - patch no longer applies:

..
Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 21883: AddShow authorized value description for withdrawn in check-in
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt).
error: could not build fake ancestor
..
Comment 13 Fridolin Somers 2021-03-08 08:53:54 UTC
(In reply to David Nind from comment #12)
> Sorry Fridolin, I was too slow retesting - patch no longer applies:
> 
> ..
> Apply? [(y)es, (n)o, (i)nteractive] y
> Applying: Bug 21883: AddShow authorized value description for withdrawn in
> check-in
> error: sha1 information is lacking or useless
> (koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt).
> error: could not build fake ancestor
> ..

Ah I had renamed a commit so there was a patch to obsolete.

Please test again :)
Comment 14 David Nind 2021-03-08 10:37:11 UTC
Created attachment 117913 [details] [review]
Bug 21883: Pass the item to the template

This patch update the controller to pass a full item object to the
template instead of a subset of item fields and updates the template to
utilise the object.

Signed-off-by: David Nind <david@davidnind.com>
Comment 15 David Nind 2021-03-08 10:37:14 UTC
Created attachment 117914 [details] [review]
Bug 21883: Show authorized value description for withdrawn in check-in

During check-in (circ/returns.pl) the withdrawn information may be
displayed in a message :
"Item is withdrawn".

Like Bug 21877 we should display the withdrawn authorized value description during check-in.

This patch adds this display.

Text changed in order to look maximum like in checkout :
https://git.koha-community.org/Koha-community/Koha/src/commit/a57278f39b8c5b7a82b21671f266dbf32e2d41a0/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt#L368
Uses class 'ci-withdrawn' to ease hidding this new information via CSS.

Test plan :
1) On a catalog with items.withdrawn defined with authorized values
   category WITHDRAWN
2) Define in WITHDRAWN an authorized values 1 with description
  'dropped in trash'
3) Define in WITHDRAWN an authorized values 2 with description
   empty
4) Check-out an item
5) Edit this item with withdrawn=1
6) Check-in this item => You see 'Item has been withdrawn (dropped
   in trash)'
7) Edit this item with withdrawn=2
8) Check-in this item => You see 'Item has been withdrawn'

Signed-off-by: David Nind <david@davidnind.com>
Comment 16 Katrin Fischer 2021-04-17 14:50:35 UTC
Created attachment 119794 [details] [review]
Bug 21883: Pass the item to the template

This patch update the controller to pass a full item object to the
template instead of a subset of item fields and updates the template to
utilise the object.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2021-04-17 14:50:40 UTC
Created attachment 119795 [details] [review]
Bug 21883: Show authorized value description for withdrawn in check-in

During check-in (circ/returns.pl) the withdrawn information may be
displayed in a message :
"Item is withdrawn".

Like Bug 21877 we should display the withdrawn authorized value description during check-in.

This patch adds this display.

Text changed in order to look maximum like in checkout :
https://git.koha-community.org/Koha-community/Koha/src/commit/a57278f39b8c5b7a82b21671f266dbf32e2d41a0/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt#L368
Uses class 'ci-withdrawn' to ease hidding this new information via CSS.

Test plan :
1) On a catalog with items.withdrawn defined with authorized values
   category WITHDRAWN
2) Define in WITHDRAWN an authorized values 1 with description
  'dropped in trash'
3) Define in WITHDRAWN an authorized values 2 with description
   empty
4) Check-out an item
5) Edit this item with withdrawn=1
6) Check-in this item => You see 'Item has been withdrawn (dropped
   in trash)'
7) Edit this item with withdrawn=2
8) Check-in this item => You see 'Item has been withdrawn'

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Jonathan Druart 2021-04-21 13:29:32 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 19 Fridolin Somers 2021-04-29 13:12:12 UTC
Pushed to 20.11.x for 20.11.06
Comment 20 Andrew Fuerste-Henry 2021-05-24 16:22:24 UTC
Enhancement, not backported to 20.05