Bug 8676 - Show vendor name in source of acquisition
Summary: Show vendor name in source of acquisition
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement with 10 votes (vote)
Assignee: Bugs List
QA Contact:
URL: cgi-bin/koha/cataloguing/additem.pl?b...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-23 13:18 UTC by Nicole C. Engard
Modified: 2024-03-27 11:04 UTC (History)
12 users (show)

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


Attachments
source of acquisition in item form (35.95 KB, image/png)
2012-09-10 13:03 UTC, Nicole C. Engard
Details
Bug 8676: Display vendor's name when cataloguing items (3.11 KB, patch)
2020-08-05 09:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 8675: Display vendor's name when cataloguing items (3.22 KB, patch)
2020-08-19 14:39 UTC, Brandon J
Details | Diff | Splinter Review
Bug 8676: Don't assume marc strucure is passed (1.47 KB, patch)
2020-08-27 07:50 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 Nicole C. Engard 2012-08-23 13:18:26 UTC
When looking at items in the staff client that were received via acquisitions there is a number in that field.  That number is the ID for the vendor, but isn't helpful to most librarians since they don't assign that vendor ID.  Could we show the name of the vendor instead?  I'm not asking to change what's stored in the DB - the ID is best in this case for reporting, but just to change the display to the vendor name that matches that ID - kind of like we do with branches and item types and collection codes - etc.  We don't show those codes, but the names instead.
Comment 1 Owen Leonard 2012-09-07 15:42:42 UTC
Nicole can you please add a screenshot?
Comment 2 Nicole C. Engard 2012-09-10 13:03:39 UTC
Created attachment 12105 [details]
source of acquisition in item form

If you look at the item info on the Items tab instead you do see the name, but the vendor ID is all that shows in the edit items screen.
Comment 3 Owen Leonard 2012-10-25 17:54:10 UTC
This works for me in current master with a newly-received item. Nicole, can you re-test?
Comment 4 Nicole C. Engard 2012-10-25 18:42:40 UTC
I just received something and see the vendor ID in the 'source of acquisition' like my screenshot ... not the name.

Nicole
Comment 5 Owen Leonard 2017-11-21 19:56:51 UTC
Can anyone reproduce this error in current master?
Comment 6 Katrin Fischer 2018-02-12 21:22:46 UTC
I think the screenshot shows the table above the edit item form. 

I just checked there and the table still shows the number. But it also shows unformatted dates and has other display issues that are not in line with the rest of Koha.

Also, the source of acquisition field is used for an id if you use acq, but also used in other ways by libraries not using acq (free text or AV value controlled).
Comment 7 Keshav Gupta 2018-07-17 06:32:15 UTC
I am facing the same issue in my KOHA Setup. Its showing vendor id in Source of Acquisition while you go to Edit Items.

This seems to be some Template data related issue. Is anyone find Solution for the same???
Comment 8 Owen Leonard 2018-07-19 13:42:21 UTC
(In reply to Keshav Gupta from comment #7)
> This seems to be some Template data related issue. Is anyone find Solution
> for the same???

This bug report confirms that the problem exists, and the lack of a patch on this bug report indicates that there isn't a solution yet.
Comment 9 Jonathan Druart 2020-08-05 09:40:57 UTC
Created attachment 107821 [details] [review]
Bug 8676: Display vendor's name when cataloguing items

If items.booksellerid is mapped to a MARC field (952$e, Source of
acquisition) then we could display a dropdown list with the list of
vendors when items are edited.

*However* we could have a weird display if it does not match the vendor
from which the items have been effectively ordered within Koha.
You could then see "Vendor X" in the cataloguing items view (additem.pl), but "Vendor
Y" on the item list (moredetail.pl)
Is this patch relevant?

Test plan:
Order and receive an item
Edit the item and note the new dropdown list for "Source of acquisition"
Note that the items table has replaced the value with the name of the
vendor's name as well
Comment 10 Jonathan Druart 2020-08-05 09:41:18 UTC
Patch submitted for discussion, I am not sure it makes sense.
Comment 11 Brandon J 2020-08-19 14:39:34 UTC
Created attachment 108636 [details] [review]
Bug 8675: Display vendor's name when cataloguing items

If items.booksellerid is mapped to a MARC field (952$e, Source of
acquisition) then we could display a dropdown list with the list of
vendors when items are edited.

*However* we could have a weird display if it does not match the vendor
from which the items have been effectively ordered within Koha.
You could then see "Vendor X" in the cataloguing items view (additem.pl), but "Vendor
Y" on the item list (moredetail.pl)
Is this patch relevant?

Test plan:
Order and receive an item
Edit the item and note the new dropdown list for "Source of acquisition"
Note that the items table has replaced the value with the name of the
vendor's name as well

Signed-off-by: Brandon J <brandon.jimenez@inLibro.com>


Current status: Signoff
Comment 12 Katrin Fischer 2020-08-26 21:28:08 UTC
This appears to break the result list:
Error trace

Can't use string ("") as a HASH ref while "strict refs" in use at /home/vagrant/kohaclone/C4/Biblio.pm line 1366

I also have another issue: items.booksellerid is not a numerical field in items, but a text one. I know a lot of libraries not using the acq module use the field to enter the vendor name (not an id, but as text) there.

I couldn't check what would happen in this case, but I guess it could be a problem for this use case.
Comment 13 Jonathan Druart 2020-08-27 07:50:30 UTC
Created attachment 109219 [details] [review]
Bug 8676: Don't assume marc strucure is passed
Comment 14 Jonathan Druart 2020-08-27 07:50:56 UTC
I fixed the 500 to let you test.
Comment 15 Katrin Fischer 2020-10-19 00:08:26 UTC
Hi Jonathan,

I think this could be really nice for libraries just starting out with Koha, but could be an issue for libraries that already have a lot of data in $e (existing vendor ids, non-existing vendor ids and actual vendor names). Which means it probably should be an optional feature.

We run into problems here when:
- Libraries have entered the vendor's name in $e (think of libraries not using the acq module)
- Libraries have values in $e that cannot be resolved as a vendor, which could lead to a data loss issue.

Could we somehow allow to display the data directly in the input field, if it cannot be resolved to a value from the pull down?

Maybe we could split display in the items table (display vendor name when it can be resolved, otherwise display $e) and the form?
Comment 16 Laura Escamilla 2023-07-11 17:30:20 UTC
+1 this is still relevant
Comment 17 Keith Dembek 2024-03-11 15:20:15 UTC
+1 for me, in our system I'm probably the only current staff member who would know a vendor #, so having the name would be very helpful for other staff!
Comment 18 Martin Renvoize 2024-03-18 12:41:43 UTC
I think this is still really important, but the patches no longer apply as is.

As for fallbacks mentioned by Katrin, looking at the code it looks like it does just fallback to the value whenever a vendor record isn't found.. is that not enough?
Comment 19 Katrin Fischer 2024-03-18 20:52:12 UTC
It's been a long time - maybe I was worried that the field might be locked for manual input if the value is not linked to a vendor?
Comment 20 Jonathan Druart 2024-03-19 14:34:20 UTC
I won't have time to work on this in a near future.