Bug 7611 - Show the NOT_LOAN authorised values for item status in XSLT OPAC search results
Summary: Show the NOT_LOAN authorised values for item status in XSLT OPAC search results
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Frédérick Capovilla
QA Contact: Jonathan Druart
URL:
Keywords:
: 19572 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-27 16:52 UTC by Frédérick Capovilla
Modified: 2020-04-21 19:01 UTC (History)
17 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.05


Attachments
XSLT Results template improvement : Use the NOT_LOAN authorised values (6.80 KB, patch)
2012-02-27 16:52 UTC, Frédérick Capovilla
Details | Diff | Splinter Review
XSLT Results template improvement : Use the NOT_LOAN authorised values (Corrected patch) (6.82 KB, patch)
2012-02-27 16:59 UTC, Frédérick Capovilla
Details | Diff | Splinter Review
New version of the initial patch (7.02 KB, patch)
2012-02-27 18:19 UTC, Frédérick Capovilla
Details | Diff | Splinter Review
Bug 7611 - Show the NOT_LOAN authorised values for item status in XSLT OPAC search results (5.39 KB, patch)
2017-03-03 19:46 UTC, Mehdi Hamidi
Details | Diff | Splinter Review
Screenshot (107.21 KB, image/jpeg)
2017-05-01 20:19 UTC, Katrin Fischer
Details
Screenshot of current display (99.72 KB, image/jpeg)
2017-05-01 20:21 UTC, Katrin Fischer
Details
Bug 7611 - Show the NOT_LOAN authorised values for item status in XSLT OPAC search results (5.53 KB, patch)
2019-02-14 14:10 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 7611: Show the NOT_LOAN authorised values for item status in XSLT OPAC search results (5.53 KB, patch)
2019-08-29 13:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7611: Change negative notforloan as well (15.32 KB, patch)
2019-08-29 13:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7611: Change negative notforloan as well (15.32 KB, patch)
2019-10-11 16:21 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 7611: (follow-up) Add missing space (744 bytes, patch)
2019-10-15 13:30 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7611: (follow-up) Fix display of undefined statuses and add a class (86.14 KB, patch)
2019-11-05 16:33 UTC, Nick Clemens
Details | Diff | Splinter Review
Sample marc record to illustrate display (698 bytes, application/x-wine-extension-mrc)
2019-11-05 16:34 UTC, Nick Clemens
Details
Bug 23986: Pass strings to Catmandu for deletion (1.54 KB, patch)
2019-11-08 16:58 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7611: Show the NOT_LOAN authorised values for item status in XSLT OPAC search results (5.32 KB, patch)
2019-11-08 16:58 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7611: Change negative notforloan as well (15.01 KB, patch)
2019-11-08 16:58 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7611: (follow-up) Add missing space (735 bytes, patch)
2019-11-08 16:59 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7611: (follow-up) Fix display of undefined statuses and add a class (86.20 KB, patch)
2019-11-08 16:59 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7611: (follow-up) separate positive and negative statuses as in the past (5.66 KB, patch)
2019-11-08 16:59 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7611: Show the NOT_LOAN authorised values for item status in XSLT OPAC search results (5.32 KB, patch)
2020-01-23 11:56 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7611: Change negative notforloan as well (15.01 KB, patch)
2020-01-23 11:56 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7611: (follow-up) Add missing space (735 bytes, patch)
2020-01-23 11:56 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7611: (follow-up) Fix display of undefined statuses and add a class (2.40 KB, patch)
2020-01-23 11:56 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7611: (follow-up) separate positive and negative statuses as in the past (5.66 KB, patch)
2020-01-23 11:56 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7611: Show the NOT_LOAN authorised values for item status in XSLT OPAC search results (5.39 KB, patch)
2020-02-17 10:49 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 7611: Change negative notforloan as well (15.08 KB, patch)
2020-02-17 10:49 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 7611: (follow-up) Add missing space (808 bytes, patch)
2020-02-17 10:49 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 7611: (follow-up) Fix display of undefined statuses and add a class (2.47 KB, patch)
2020-02-17 10:49 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 7611: (follow-up) separate positive and negative statuses as in the past (5.73 KB, patch)
2020-02-17 10:49 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 7611: Adjust tests (1.64 KB, patch)
2020-02-18 09:38 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Frédérick Capovilla 2012-02-27 16:52:54 UTC Comment hidden (obsolete)
Comment 1 Frédérick Capovilla 2012-02-27 16:55:07 UTC
Patch sponsored by the CCSR ( http://www.ccsr.qc.ca )
Comment 2 Frédérick Capovilla 2012-02-27 16:59:46 UTC Comment hidden (obsolete)
Comment 3 Frédérick Capovilla 2012-02-27 18:19:30 UTC Comment hidden (obsolete)
Comment 4 Magnus Enger 2012-02-28 10:22:16 UTC
I have made a note to look at this for NORMARC some time, but not sure when i can get around to doing it. 

Setting status to Needs Signoff, since there is a patch.
Comment 5 Owen Leonard 2012-03-09 18:21:52 UTC
I like this change because it better accommodates use of "not for loan" in cases where the item is available. I'm comparing the before and after:

Before:

Copies available for loan: Nelsonville [E Minarik] (1). 
Copies available for reference: Athens [E Minarik] (2). Lost (1). Damaged (1).

After:

Copies available for loan: Nelsonville [E Minarik] (1). Staff collection (1). Not for loan (1). Damaged (1). Lost (1). 

What the new version lacks, I think, is output of the call number for "not for loan" items. If we consider these items available in some sense of the term (in library-use, reference, etc), shouldn't we show the call number as in the "before" view?
Comment 6 Marijana Glavica 2012-06-11 11:20:46 UTC
Except not showing call numbers, as Owen noted, there are few more things I noticed until now, so here are my examples:

Before:
Availability: Copies available for loan: Gimnazija Požega [456] (1), Knjižnica FFZG [678] (1).
Copies available for reference: Knjižnica FFZG [R-123] (2). Damaged (1). 

After:
Availability: Copies available for loan: Gimnazija Požega [456] (1), Knjižnica FFZG [678] (1). Damaged (1). Not for loan (1). Staff Collection (1). 

So, everything is now in one line. I don't agree that this is nicer, because now we have "not for loan" items under "Copies available for loan" label. The solution would be to change label only to "Available" or "Available for use" or something.

This is tiny change to make, but there is another problem. In my second example I have situation like this:

Before:
Availability: Copies available for reference: Knjižnica FFZG [not for loan] (1). 

After:
Availability: No copies available Not for loan (1).

So, in my first example i have "not for loan" items under "Copies available for loan", but in my second example with just one item for biblio, this label disappears.


In our library, items marked with "not for loan" status are available, but they can be used only in library, so the label "copies available for reference" was telling our users exactly that.
Comment 7 Owen Leonard 2016-06-23 12:06:01 UTC
I think this is still valid on master. It looks to me like the only special handling we have for "not for loan" is for on-order items. Otherwise it's "Items available for reference."
Comment 8 Barton Chittenden 2016-10-12 18:39:26 UTC
We've had other libraries report this issue as well.

Would it be possible to get some movement on this?

Thanks,

--Barton
Comment 9 Mehdi Hamidi 2017-03-03 19:46:35 UTC
Created attachment 60816 [details] [review]
Bug 7611 - Show the NOT_LOAN authorised values for item status in XSLT OPAC search results

Added : Call number for all not for loan status

XSLT Results template improvement : Use the NOT_LOAN authorised values

Improvement : Use the NOT_LOAN authorised values when showing items status in the OPAC search results.
Before this patch, these items were only considered as "unavailable".

Note : This patch only affects the OPAC XSLT search results template for MARC21 records. This patch was not tested on UNIMARC or NORMARC records. I won't be able to support these formats, so I'm hoping someone could do the same for these other record formats.

Patch sponsored by the CCSR ( http://www.ccsr.qc.ca )
Comment 10 Katrin Fischer 2017-05-01 20:19:19 UTC
Created attachment 62930 [details]
Screenshot

Tested with a record with 5 items:
- no status set, normal itemtype
- no status set, itemtype is marked as not for loan
- damaged: damaged
- not for loan: staff collection
- not for loan: on order

- As soon as I added the item with the not for loan itemtype an additional blank line appeared between the available and unavailable items
- Before the patch the items were counted as 'available' in green, after the patch the not for loan items are counted as 'unavailable' in red. I think this is a somewhat unexpected change. As I see it we define availability as 'accessible', but not necessarily as 'for loan'. I think this change needs to be discussed. 
- Showing the authorised value description means that this will no longer be translatable. For libraries offering the OPAC in multiple languages this might be a problem (we really need to make authorised values multi-lang as the itemtypes).

Marking failed for the additional blank line.
Comment 11 Katrin Fischer 2017-05-01 20:21:56 UTC
Created attachment 62931 [details]
Screenshot of current display

Current display for comparison (note: my items didn't have callnumbers)
Comment 12 Joy Nelson 2019-02-14 14:10:09 UTC
*** Bug 19572 has been marked as a duplicate of this bug. ***
Comment 13 Kyle M Hall 2019-02-14 14:10:58 UTC
Created attachment 85115 [details] [review]
Bug 7611 - Show the NOT_LOAN authorised values for item status in XSLT OPAC search results

Added : Call number for all not for loan status

XSLT Results template improvement : Use the NOT_LOAN authorised values

Improvement : Use the NOT_LOAN authorised values when showing items status in the OPAC search results.
Before this patch, these items were only considered as "unavailable".

Note : This patch only affects the OPAC XSLT search results template for MARC21 records. This patch was not tested on UNIMARC or NORMARC records. I won't be able to support these formats, so I'm hoping someone could do the same for these other record formats.

Patch sponsored by the CCSR ( http://www.ccsr.qc.ca )
Comment 14 Kyle M Hall 2019-02-14 14:26:45 UTC
I'm not seeing the problem.
Comment 15 Owen Leonard 2019-02-15 14:10:52 UTC
This works for notforloatn values > 0. A value of -1 still shows a default "On order" instead of the text I have defined in authorized values.

I think it is a big change that items are now shown as unavailable instead of "available for reference." I think neither is ideal, but sticking with the old label is probably better if we're not going to come up with a more comprehensive solution in this bug (i.e. have a way to define what is "for reference" and what is wholly unavailable).
Comment 16 Caroline Cyr La Rose 2019-08-09 20:25:43 UTC
I find that this is still a problem. Is the only thing left to determine/dicuss is what we want for items that are "available" but "not for loan" (e.g. available for reference or in-library use)?
Comment 17 Nick Clemens 2019-08-29 13:54:17 UTC
Created attachment 92495 [details] [review]
Bug 7611: Show the NOT_LOAN authorised values for item status in XSLT OPAC search results

Added : Call number for all not for loan status

XSLT Results template improvement : Use the NOT_LOAN authorised values

Improvement : Use the NOT_LOAN authorised values when showing items status in the OPAC search results.
Before this patch, these items were only considered as "unavailable".

Note : This patch only affects the OPAC XSLT search results template for MARC21 records. This patch was not tested on UNIMARC or NORMARC records. I won't be able to support these formats, so I'm hoping someone could do the same for these other record formats.

Patch sponsored by the CCSR ( http://www.ccsr.qc.ca )
Comment 18 Nick Clemens 2019-08-29 13:54:24 UTC
Created attachment 92496 [details] [review]
Bug 7611: Change negative notforloan as well

This makes the changes apply to both positive and negative notforloan values

The extra line generated before is removed

Some spans are added and cleaned up and labels moved to CSS to allow for easier altering where needed

Itemtypes marked notforloan remain as reference, the label can be changed via css

To test:
 1 - Have a record with items in various statuses, ideally
   - 3 available, with 2 in one branch, 1 in another
   - 3 with itemtype not for loan, 2 in one branch, 1 in another
   - 3 in a positive not for loan status, 2 and 1 as above
   - 3 in a negative not for loan status, 2 and 1 as above
   - 1 in a different positive loan status, but with the same opac description as the negative above
 2 - Search the opac to include this record, take a screenshot
 3 - Apply patch
 4 - Restart all and refresh
 5 - Compare to screen shot
 6 - Differences include:
   - Positive statuses are now on separate line with opac description showing
   - Unavailable (not for loan items) now include callnumber and branch in display
   - Positive and negative notforloan with same description are combined where branches match
   - Inspect the elements, note new spans around 'Items available for
loan/reference'
 7 - Add to OPACUserCSS:
  .ItemSummary .ItemBranch{
    display:none;
  }
  .unavailable .ItemSummary .CallNumber,.unavailable .ItemSummary .LabelCallNumber{
    display:none;
  }
 8 - Note the branches are hidden, and callnumbe rhidden for unavailable
items
Comment 19 ByWater Sandboxes 2019-10-11 16:21:49 UTC
Created attachment 94026 [details] [review]
Bug 7611: Change negative notforloan as well

This makes the changes apply to both positive and negative notforloan values

The extra line generated before is removed

Some spans are added and cleaned up and labels moved to CSS to allow for easier altering where needed

Itemtypes marked notforloan remain as reference, the label can be changed via css

To test:
 1 - Have a record with items in various statuses, ideally
   - 3 available, with 2 in one branch, 1 in another
   - 3 with itemtype not for loan, 2 in one branch, 1 in another
   - 3 in a positive not for loan status, 2 and 1 as above
   - 3 in a negative not for loan status, 2 and 1 as above
   - 1 in a different positive loan status, but with the same opac description as the negative above
 2 - Search the opac to include this record, take a screenshot
 3 - Apply patch
 4 - Restart all and refresh
 5 - Compare to screen shot
 6 - Differences include:
   - Positive statuses are now on separate line with opac description showing
   - Unavailable (not for loan items) now include callnumber and branch in display
   - Positive and negative notforloan with same description are combined where branches match
   - Inspect the elements, note new spans around 'Items available for
loan/reference'
 7 - Add to OPACUserCSS:
  .ItemSummary .ItemBranch{
    display:none;
  }
  .unavailable .ItemSummary .CallNumber,.unavailable .ItemSummary .LabelCallNumber{
    display:none;
  }
 8 - Note the branches are hidden, and callnumbe rhidden for unavailable
items

Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Comment 20 Katrin Fischer 2019-10-12 11:49:52 UTC
Sorry, but something is not working quite right here still. I get quite unreadable output in the OPAC :(

With this patch:
Availability: Items available for loan: CentervilleCall number: 005.13/3 (1).
Centerville Staff CollectionCall number: 005.13/3 (2), Centerville OrderedCall number: 005.13/3 (1). Damaged (1). 

Before:
Availability: Items available for loan: Centerville [Call number: 005.13/3] (1). Items available for reference: Centerville [Call number: 005.13/3] (1).
Damaged (1). On order (1). 

- Can we please bring back the [] for now? 
- Totally missing the: 'Available for reference' label?
- I am also tempted to say 'kill Call number', but we should concentrate on one change at a time here. We should focus on the 'not for loan' descriptions here first.
Comment 21 Katrin Fischer 2019-10-12 11:50:41 UTC
My example: Record with 4 items:
- 1 damaged + Staff collecton
- 1 ordered
- 1 Staff collection
- 1 'without' status
Comment 22 Katrin Fischer 2019-10-12 11:55:15 UTC
Forgot to run yarn build --view opac

It's better now, but problems still remain with spaces and 'for reference' label. [] show... but I can't copy and paste them from the OPAC to here? 

With C&P:
Items available for loan: CentervilleCall number: 005.13/3 (1).
Centerville Staff CollectionCall number: 005.13/3 (2), Centerville OrderedCall number: 005.13/3 (1). Damaged (1). 

Manually edited:
Items available for loan: Centerville[Call number: 005.13/3] (1).
Centerville Staff Collection[Call number: 005.13/3] (2), Centerville Ordered[Call number: 005.13/3] (1). Damaged (1).
Comment 23 Nick Clemens 2019-10-15 13:29:07 UTC
(In reply to Katrin Fischer from comment #22)
> Forgot to run yarn build --view opac
> 
> It's better now, but problems still remain with spaces and 'for reference'
> label. [] show... but I can't copy and paste them from the OPAC to here? 
> 
> With C&P:
> Items available for loan: CentervilleCall number: 005.13/3 (1).
> Centerville Staff CollectionCall number: 005.13/3 (2), Centerville
> OrderedCall number: 005.13/3 (1). Damaged (1). 
> 
> Manually edited:
> Items available for loan: Centerville[Call number: 005.13/3] (1).
> Centerville Staff Collection[Call number: 005.13/3] (2), Centerville
> Ordered[Call number: 005.13/3] (1). Damaged (1).

I can add a space to the callnumber brackets - I moved them from the template to the css as some libraries don't want them and it seemed an easier fix than adding yet another span to the template - the CSS is I supposed what makes them not copy/paste

What do you mean about missing 'for reference'? From my perspective that is a goal of the patch here - to remove that label and use the notforloan descriptions - if a library wants items to appear that way then they can make that the description of the authorized value for the opac. This way those who want it can put it in place, and those who don't can provide their own description
Comment 24 Nick Clemens 2019-10-15 13:30:25 UTC
Created attachment 94212 [details] [review]
Bug 7611: (follow-up) Add missing space
Comment 25 Katrin Fischer 2019-10-15 18:54:21 UTC
> > Manually edited:
> > Items available for loan: Centerville[Call number: 005.13/3] (1).
> > Centerville Staff Collection[Call number: 005.13/3] (2), Centerville
> > Ordered[Call number: 005.13/3] (1). Damaged (1).

> 
> What do you mean about missing 'for reference'? From my perspective that is
> a goal of the patch here - to remove that label and use the notforloan
> descriptions - if a library wants items to appear that way then they can
> make that the description of the authorized value for the opac. This way
> those who want it can put it in place, and those who don't can provide their
> own description

But then we should also remove the "Items available for loan".
Because that is clearly giving a wrong idea?

Just: Items: ?

Or we can still assume that items that are marked with any 'not for loan' value are for reference and list them with their individual status descriptions behind the "Items available for reference" label.
Comment 26 Nick Clemens 2019-10-16 16:40:08 UTC
(In reply to Katrin Fischer from comment #25)
> > > Manually edited:
> > > Items available for loan: Centerville[Call number: 005.13/3] (1).
> > > Centerville Staff Collection[Call number: 005.13/3] (2), Centerville
> > > Ordered[Call number: 005.13/3] (1). Damaged (1).
> 
> > 
> > What do you mean about missing 'for reference'? From my perspective that is
> > a goal of the patch here - to remove that label and use the notforloan
> > descriptions - if a library wants items to appear that way then they can
> > make that the description of the authorized value for the opac. This way
> > those who want it can put it in place, and those who don't can provide their
> > own description
> 
> But then we should also remove the "Items available for loan".
> Because that is clearly giving a wrong idea?
> 
> Just: Items: ?
> 
> Or we can still assume that items that are marked with any 'not for loan'
> value are for reference and list them with their individual status
> descriptions behind the "Items available for reference" label.

NVM, I got confused, yes, the conditional for 'reference' needs a fix, checking this one
Comment 27 Nick Clemens 2019-11-05 16:33:15 UTC
Okay, I reviewed this, what it does is that:
Available doesn't change
Items marked 'not for loan' at itemtype level go into 'Available for reference'
Items marked 'not for loan' individually, whether negative or positive, are displayed in the 'unavailable' section with the description of the 'not for loan' status showing.

If you have several not for loan statuses with the same description, e.g. 'Available for reference' then they will be displayed together in the unavailable section

It also adds some classes and styling to allow for the end user to adjust using css/jquery

I am attaching a smaple record as described in the test plan which you can import if using the default database. You will need to add a 'NOT_LOAN' value of 4 with opac description 'Ordered' to see it in operation
Comment 28 Nick Clemens 2019-11-05 16:33:35 UTC
Created attachment 95060 [details] [review]
Bug 7611: (follow-up) Fix display of undefined statuses and add a class
Comment 29 Nick Clemens 2019-11-05 16:34:05 UTC
Created attachment 95061 [details]
Sample marc record to illustrate display
Comment 30 Katrin Fischer 2019-11-06 21:01:35 UTC
(In reply to Nick Clemens from comment #27)
> Okay, I reviewed this, what it does is that:
> Available doesn't change
> Items marked 'not for loan' at itemtype level go into 'Available for
> reference'
> Items marked 'not for loan' individually, whether negative or positive, are
> displayed in the 'unavailable' section with the description of the 'not for
> loan' status showing.
> 
> If you have several not for loan statuses with the same description, e.g.
> 'Available for reference' then they will be displayed together in the
> unavailable section
> 
> It also adds some classes and styling to allow for the end user to adjust
> using css/jquery
> 
> I am attaching a smaple record as described in the test plan which you can
> import if using the default database. You will need to add a 'NOT_LOAN'
> value of 4 with opac description 'Ordered' to see it in operation

Hi Nick, 

first: thank you for the summary! Second: I am sorry, it just doesn't feel quite right yet to me :( I am trying to put into words, but please feel free to get others opinions as well.

>Items marked 'not for loan' at itemtype level go into 'Available for reference'
>Items marked 'not for loan' individually, whether negative or positive, are displayed in the 'unavailable' section with the >description of the 'not for loan' status showing

1) We have built on the fact that the not-for-loan works the same on item type as on individual level and I think this change might be controversial. With the patch, itype level 'not for loan' is green, but individual show red = different messages. Koha defines available as 'on the shelf' not as 'loanable' in my understanding - so green seems the better default choice.

2) The display with the extra break looks like we are missing a label (I think it's intended, but that's the impression I get):

Availability: Items available for loan: Midway (1).
Centerville Staff Collection (1).

Or with some more items:

Availability: Items available for loan: Centerville (1). Items available for reference: Centerville (1).
Centerville Staff Collection (1). Damaged (1). 

I think I'd opt for removing the line break and always displaying the "Itmes available for reference:" when there is at least one item with a not for loan value. That would mean the first example would look like this:

Availability: Items available for loan: Midway (1). Items available for reference: Centerville Staff Collection (1).

And the second could be like this, using a comma between different values:

Availability: Items available for loan: Centerville (1). Items available for reference: Centerville (1),
Centerville Staff Collection (1). Damaged (1). 



Just notes (no lockers at all): 

I see that you use individual CSS classes on the items, I like that. Just wondering: currently we use the description, so a description change will mean the CSS needs to change as well. On the other side: not for loan values are numeric and we are grouping the onces with the same name and I like that - so that's probably the best way.
Comment 31 Nick Clemens 2019-11-08 16:58:04 UTC
Created attachment 95235 [details] [review]
Bug 23986: Pass strings to Catmandu for deletion

The deletion subroutine expects to get a string, this is fine in most places, but when
we sort our records for batch deletion they are cast to numbers and the delete is not processed.

This patch quotes the biblionumbers as strings before passing them to Catmandu

To aid in detecting orphaned records you can use the patches on bug 22831

To test:
 1 - Have or create a bib
 2 - Go to Tools->Batch record deletion
 3 - Click 'Enter a list of record numbers'
 4 - Enter the biblionumber'
 5 - Confirm deletion
 6 - Search for the record, it still appears
 7 - Apply patch, restart all the things
 8 - Repeat 1-6
 9 - This time the record is deleted
10 - Test other methods of record deletion to confirm the record is removed
Comment 32 Nick Clemens 2019-11-08 16:58:52 UTC
Created attachment 95236 [details] [review]
Bug 7611: Show the NOT_LOAN authorised values for item status in XSLT OPAC search results

Added : Call number for all not for loan status

XSLT Results template improvement : Use the NOT_LOAN authorised values

Improvement : Use the NOT_LOAN authorised values when showing items status in the OPAC search results.
Before this patch, these items were only considered as "unavailable".

Note : This patch only affects the OPAC XSLT search results template for MARC21 records. This patch was not tested on UNIMARC or NORMARC records. I won't be able to support these formats, so I'm hoping someone could do the same for these other record formats.

Patch sponsored by the CCSR ( http://www.ccsr.qc.ca )
Comment 33 Nick Clemens 2019-11-08 16:58:56 UTC
Created attachment 95237 [details] [review]
Bug 7611: Change negative notforloan as well

This makes the changes apply to both positive and negative notforloan values

The extra line generated before is removed

Some spans are added and cleaned up and labels moved to CSS to allow for easier altering where needed

Itemtypes marked notforloan remain as reference, the label can be changed via css

To test:
 1 - Have a record with items in various statuses, ideally
   - 3 available, with 2 in one branch, 1 in another
   - 3 with itemtype not for loan, 2 in one branch, 1 in another
   - 3 in a positive not for loan status, 2 and 1 as above
   - 3 in a negative not for loan status, 2 and 1 as above
   - 1 in a different positive loan status, but with the same opac description as the negative above
 2 - Search the opac to include this record, take a screenshot
 3 - Apply patch
 4 - Restart all and refresh
 5 - Compare to screen shot
 6 - Differences include:
   - Positive statuses are now on separate line with opac description showing
   - Unavailable (not for loan items) now include callnumber and branch in display
   - Positive and negative notforloan with same description are combined where branches match
   - Inspect the elements, note new spans around 'Items available for
loan/reference'
 7 - Add to OPACUserCSS:
  .ItemSummary .ItemBranch{
    display:none;
  }
  .unavailable .ItemSummary .CallNumber,.unavailable .ItemSummary .LabelCallNumber{
    display:none;
  }
 8 - Note the branches are hidden, and callnumbe rhidden for unavailable
items

Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Comment 34 Nick Clemens 2019-11-08 16:59:00 UTC
Created attachment 95238 [details] [review]
Bug 7611: (follow-up) Add missing space
Comment 35 Nick Clemens 2019-11-08 16:59:04 UTC
Created attachment 95239 [details] [review]
Bug 7611: (follow-up) Fix display of undefined statuses and add a class
Comment 36 Nick Clemens 2019-11-08 16:59:09 UTC
Created attachment 95240 [details] [review]
Bug 7611: (follow-up) separate positive and negative statuses as in the past

This patch preserves someting closer to previous functionality.

Negative not for loan are in the 'unavailable' section in red, positive ones are in the 'reference' section in green. Itemtype level will also be in green in reference

Item specific status will override an itemtype level.

The line break between 'reference' and 'unavailable' existed before and is preserved - negative not for loan and checked out items appear here
Comment 37 Nick Clemens 2019-11-08 17:03:34 UTC
(In reply to Katrin Fischer from comment #30)
> (In reply to Nick Clemens from comment #27)
> 
> 1) We have built on the fact that the not-for-loan works the same on item
> type as on individual level and I think this change might be controversial.

Good point, last patch restores postive statuses to the 'green' section. Itemtype notforloan get 'Not for loan' as description and will lump with any others with same description

> 2) The display with the extra break looks like we are missing a label (I
> think it's intended, but that's the impression I get)

The line break was always there for Checked Out or On Order items, so I opted to preserve it. Negative not for loan are on this line as they were all 'On order' before - the negative seeming to imply 'holdable' but not 'available'

> Just notes (no blockers at all): 
> 
> I see that you use individual CSS classes on the items, I like that. Just
> wondering: currently we use the description, so a description change will
> mean the CSS needs to change as well. On the other side: not for loan values
> are numeric and we are grouping the onces with the same name and I like that
> - so that's probably the best way.

Excellent, I think you agree with me here that grouping by description is good. It allows for staff to have two separate values with differing descriptions that show the same on the opac, which I think could have value.
Comment 38 Jonathan Druart 2020-01-23 11:46:32 UTC
error: sha1 information is lacking or useless (koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl).
Comment 39 Nick Clemens 2020-01-23 11:56:41 UTC
Created attachment 97804 [details] [review]
Bug 7611: Show the NOT_LOAN authorised values for item status in XSLT OPAC search results

Added : Call number for all not for loan status

XSLT Results template improvement : Use the NOT_LOAN authorised values

Improvement : Use the NOT_LOAN authorised values when showing items status in the OPAC search results.
Before this patch, these items were only considered as "unavailable".

Note : This patch only affects the OPAC XSLT search results template for MARC21 records. This patch was not tested on UNIMARC or NORMARC records. I won't be able to support these formats, so I'm hoping someone could do the same for these other record formats.

Patch sponsored by the CCSR ( http://www.ccsr.qc.ca )
Comment 40 Nick Clemens 2020-01-23 11:56:46 UTC
Created attachment 97805 [details] [review]
Bug 7611: Change negative notforloan as well

This makes the changes apply to both positive and negative notforloan values

The extra line generated before is removed

Some spans are added and cleaned up and labels moved to CSS to allow for easier altering where needed

Itemtypes marked notforloan remain as reference, the label can be changed via css

To test:
 1 - Have a record with items in various statuses, ideally
   - 3 available, with 2 in one branch, 1 in another
   - 3 with itemtype not for loan, 2 in one branch, 1 in another
   - 3 in a positive not for loan status, 2 and 1 as above
   - 3 in a negative not for loan status, 2 and 1 as above
   - 1 in a different positive loan status, but with the same opac description as the negative above
 2 - Search the opac to include this record, take a screenshot
 3 - Apply patch
 4 - Restart all and refresh
 5 - Compare to screen shot
 6 - Differences include:
   - Positive statuses are now on separate line with opac description showing
   - Unavailable (not for loan items) now include callnumber and branch in display
   - Positive and negative notforloan with same description are combined where branches match
   - Inspect the elements, note new spans around 'Items available for
loan/reference'
 7 - Add to OPACUserCSS:
  .ItemSummary .ItemBranch{
    display:none;
  }
  .unavailable .ItemSummary .CallNumber,.unavailable .ItemSummary .LabelCallNumber{
    display:none;
  }
 8 - Note the branches are hidden, and callnumbe rhidden for unavailable
items

Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Comment 41 Nick Clemens 2020-01-23 11:56:50 UTC
Created attachment 97806 [details] [review]
Bug 7611: (follow-up) Add missing space
Comment 42 Nick Clemens 2020-01-23 11:56:54 UTC
Created attachment 97807 [details] [review]
Bug 7611: (follow-up) Fix display of undefined statuses and add a class
Comment 43 Nick Clemens 2020-01-23 11:56:58 UTC
Created attachment 97808 [details] [review]
Bug 7611: (follow-up) separate positive and negative statuses as in the past

This patch preserves someting closer to previous functionality.

Negative not for loan are in the 'unavailable' section in red, positive ones are in the 'reference' section in green. Itemtype level will also be in green in reference

Item specific status will override an itemtype level.

The line break between 'reference' and 'unavailable' existed before and is preserved - negative not for loan and checked out items appear here
Comment 44 Jonathan Druart 2020-02-05 10:24:43 UTC
Nick, could you confirm it will not break the display for UNIMARC and NORMARC?
Comment 45 Nick Clemens 2020-02-11 14:21:12 UTC
(In reply to Jonathan Druart from comment #44)
> Nick, could you confirm it will not break the display for UNIMARC and
> NORMARC?

NORMARC is no longer maintained according to Magnuse, so we cna ignore that

UNIMARC is not affected by these changes - the status for notforloan items remains the same, only substatus is added. The CSS changes rely on classes that don't exist in the UNIMARC xslt

I did file bug 24630 and attempt UNIMARC changes, but that should not block this patchset
Comment 46 Jonathan Druart 2020-02-17 10:49:08 UTC
Created attachment 99074 [details] [review]
Bug 7611: Show the NOT_LOAN authorised values for item status in XSLT OPAC search results

Added : Call number for all not for loan status

XSLT Results template improvement : Use the NOT_LOAN authorised values

Improvement : Use the NOT_LOAN authorised values when showing items status in the OPAC search results.
Before this patch, these items were only considered as "unavailable".

Note : This patch only affects the OPAC XSLT search results template for MARC21 records. This patch was not tested on UNIMARC or NORMARC records. I won't be able to support these formats, so I'm hoping someone could do the same for these other record formats.

Patch sponsored by the CCSR ( http://www.ccsr.qc.ca )

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 47 Jonathan Druart 2020-02-17 10:49:13 UTC
Created attachment 99075 [details] [review]
Bug 7611: Change negative notforloan as well

This makes the changes apply to both positive and negative notforloan values

The extra line generated before is removed

Some spans are added and cleaned up and labels moved to CSS to allow for easier altering where needed

Itemtypes marked notforloan remain as reference, the label can be changed via css

To test:
 1 - Have a record with items in various statuses, ideally
   - 3 available, with 2 in one branch, 1 in another
   - 3 with itemtype not for loan, 2 in one branch, 1 in another
   - 3 in a positive not for loan status, 2 and 1 as above
   - 3 in a negative not for loan status, 2 and 1 as above
   - 1 in a different positive loan status, but with the same opac description as the negative above
 2 - Search the opac to include this record, take a screenshot
 3 - Apply patch
 4 - Restart all and refresh
 5 - Compare to screen shot
 6 - Differences include:
   - Positive statuses are now on separate line with opac description showing
   - Unavailable (not for loan items) now include callnumber and branch in display
   - Positive and negative notforloan with same description are combined where branches match
   - Inspect the elements, note new spans around 'Items available for
loan/reference'
 7 - Add to OPACUserCSS:
  .ItemSummary .ItemBranch{
    display:none;
  }
  .unavailable .ItemSummary .CallNumber,.unavailable .ItemSummary .LabelCallNumber{
    display:none;
  }
 8 - Note the branches are hidden, and callnumbe rhidden for unavailable
items

Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 48 Jonathan Druart 2020-02-17 10:49:18 UTC
Created attachment 99076 [details] [review]
Bug 7611: (follow-up) Add missing space

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 49 Jonathan Druart 2020-02-17 10:49:22 UTC
Created attachment 99077 [details] [review]
Bug 7611: (follow-up) Fix display of undefined statuses and add a class

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 50 Jonathan Druart 2020-02-17 10:49:29 UTC
Created attachment 99078 [details] [review]
Bug 7611: (follow-up) separate positive and negative statuses as in the past

This patch preserves someting closer to previous functionality.

Negative not for loan are in the 'unavailable' section in red, positive ones are in the 'reference' section in green. Itemtype level will also be in green in reference

Item specific status will override an itemtype level.

The line break between 'reference' and 'unavailable' existed before and is preserved - negative not for loan and checked out items appear here

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 51 Martin Renvoize 2020-02-17 11:31:47 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 52 Jonathan Druart 2020-02-18 09:38:14 UTC
Created attachment 99163 [details] [review]
Bug 7611: Adjust tests
Comment 53 Martin Renvoize 2020-02-18 13:55:38 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 54 Joy Nelson 2020-03-05 01:29:26 UTC
enhancement not backported to 19.11.x
Comment 55 Joy Nelson 2020-04-21 19:01:25 UTC
Backported to 19.11.x for 19.11.05 per request