Summary: | Show the vendor type description on vendor detail page when AV is used | ||
---|---|---|---|
Product: | Koha | Reporter: | Caroline Cyr La Rose <caroline.cyr-la-rose> |
Component: | Acquisitions | Assignee: | Katrin Fischer <katrin.fischer> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | jonathan.druart |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.05.00
|
|
Circulation function: | |||
Bug Depends on: | 31017 | ||
Bug Blocks: | |||
Attachments: |
Bug 33003: Show the vendor type on vendor detail page
Bug 33003: Show the vendor type on vendor detail page Bug 33003: Show the vendor type on vendor detail page Bug 33003: Show the vendor type on vendor detail page Bug 33003: Show the vendor type on vendor detail page Bug 33003: Show the vendor type on vendor detail page |
Description
Caroline Cyr La Rose
2023-02-17 21:01:06 UTC
Created attachment 146910 [details] [review] Bug 33003: Show the vendor type on vendor detail page When using an authorised value VENDOR_TYPE for the vendor type, we should show the AV description everywhere instead of the code. It already works on the vendor search, but not on the vendor detail page. With this patch it will also work there. To test: 1. Add at least one authorized value in VENDOR_TYPE 1.1. Go to Administration > Authorized values 1.2. Search for VENDOR_TYPE 1.3. Click 'Add' 1.4. Fill out the form - Authorized value: BOOK - Description: Print books 1.5. Click 'Save' 2. Add a new vendor 2.1. Go to Acquisitions 2.2. Click 'New vendor' 2.3. Fill out the form - Name: ABC Bookstore - Vendor type: Print books 2.4. Click 'Save' 3. Go to the vendor page 3.1. Click on the vendor name --> The value in "Type" is BOOK, it should be "Print books" 4. Apply patch 4.1. Repeat test, now it should show the description https://bugs.koha-community.org/show_bug.cgi?id=33002 Created attachment 146911 [details] [review] Bug 33003: Show the vendor type on vendor detail page When using an authorised value VENDOR_TYPE for the vendor type, we should show the AV description everywhere instead of the code. It already works on the vendor search, but not on the vendor detail page. With this patch it will also work there. To test: 1. Add at least one authorized value in VENDOR_TYPE 1.1. Go to Administration > Authorized values 1.2. Search for VENDOR_TYPE 1.3. Click 'Add' 1.4. Fill out the form - Authorized value: BOOK - Description: Print books 1.5. Click 'Save' 2. Add a new vendor 2.1. Go to Acquisitions 2.2. Click 'New vendor' 2.3. Fill out the form - Name: ABC Bookstore - Vendor type: Print books 2.4. Click 'Save' 3. Go to the vendor page 3.1. Click on the vendor name --> The value in "Type" is BOOK, it should be "Print books" 4. Apply patch 4.1. Repeat test, now it should show the description Created attachment 146920 [details] [review] Bug 33003: Show the vendor type on vendor detail page When using an authorised value VENDOR_TYPE for the vendor type, we should show the AV description everywhere instead of the code. It already works on the vendor search, but not on the vendor detail page. With this patch it will also work there. To test: 1. Add at least one authorized value in VENDOR_TYPE 1.1. Go to Administration > Authorized values 1.2. Search for VENDOR_TYPE 1.3. Click 'Add' 1.4. Fill out the form - Authorized value: BOOK - Description: Print books 1.5. Click 'Save' 2. Add a new vendor 2.1. Go to Acquisitions 2.2. Click 'New vendor' 2.3. Fill out the form - Name: ABC Bookstore - Vendor type: Print books 2.4. Click 'Save' 3. Go to the vendor page 3.1. Click on the vendor name --> The value in "Type" is BOOK, it should be "Print books" 4. Apply patch 4.1. Repeat test, now it should show the description Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 146958 [details] [review] Bug 33003: Show the vendor type on vendor detail page When using an authorised value VENDOR_TYPE for the vendor type, we should show the AV description everywhere instead of the code. It already works on the vendor search, but not on the vendor detail page. With this patch it will also work there. To test: 1. Add at least one authorized value in VENDOR_TYPE 1.1. Go to Administration > Authorized values 1.2. Search for VENDOR_TYPE 1.3. Click 'Add' 1.4. Fill out the form - Authorized value: BOOK - Description: Print books 1.5. Click 'Save' 2. Add a new vendor 2.1. Go to Acquisitions 2.2. Click 'New vendor' 2.3. Fill out the form - Name: ABC Bookstore - Vendor type: Print books 2.4. Click 'Save' 3. Go to the vendor page 3.1. Click on the vendor name --> The value in "Type" is BOOK, it should be "Print books" 4. Apply patch 4.1. Repeat test, now it should show the description Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Thanks Katrin! Should not we fallback to the original value of the AV does not exist? To recreate: Don't have VENDOR_TYPE Add a type (free text) Add the av category + create some values Edit the vendor, save => You lost the original value. (In reply to Jonathan Druart from comment #6) > Should not we fallback to the original value of the AV does not exist? *if* the AV does not exist (In reply to Jonathan Druart from comment #6) > Should not we fallback to the original value of the AV does not exist? > > To recreate: > Don't have VENDOR_TYPE > Add a type (free text) > Add the av category + create some values > Edit the vendor, save > => You lost the original value. This is a known data loss issue we struggle in some places with, but it's not reason to fail this patch :) * This is a display fix, it doesn't touch the pull down/edit page at all. * The same code is used in the result list already. * If you have no matching AV entry, the code will display, so it works for both types: libraries using the AV and the ones not using it. * The category will be added as system_internal in bug 33004, so ALL will have it an cannot get rid of it. Created attachment 147212 [details] [review] Bug 33003: Show the vendor type on vendor detail page When using an authorised value VENDOR_TYPE for the vendor type, we should show the AV description everywhere instead of the code. It already works on the vendor search, but not on the vendor detail page. With this patch it will also work there. To test: 1. Add at least one authorized value in VENDOR_TYPE 1.1. Go to Administration > Authorized values 1.2. Search for VENDOR_TYPE 1.3. Click 'Add' 1.4. Fill out the form - Authorized value: BOOK - Description: Print books 1.5. Click 'Save' 2. Add a new vendor 2.1. Go to Acquisitions 2.2. Click 'New vendor' 2.3. Fill out the form - Name: ABC Bookstore - Vendor type: Print books 2.4. Click 'Save' 3. Go to the vendor page 3.1. Click on the vendor name --> The value in "Type" is BOOK, it should be "Print books" 4. Apply patch 4.1. Repeat test, now it should show the description Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Indeed, only for display. I hit the problem when editing the vendor. We should not have pushed the feature without some AVs... Created attachment 147222 [details] [review] Bug 33003: Show the vendor type on vendor detail page When using an authorised value VENDOR_TYPE for the vendor type, we should show the AV description everywhere instead of the code. It already works on the vendor search, but not on the vendor detail page. With this patch it will also work there. To test: 1. Add at least one authorized value in VENDOR_TYPE 1.1. Go to Administration > Authorized values 1.2. Search for VENDOR_TYPE 1.3. Click 'Add' 1.4. Fill out the form - Authorized value: BOOK - Description: Print books 1.5. Click 'Save' 2. Add a new vendor 2.1. Go to Acquisitions 2.2. Click 'New vendor' 2.3. Fill out the form - Name: ABC Bookstore - Vendor type: Print books 2.4. Click 'Save' 3. Go to the vendor page 3.1. Click on the vendor name --> The value in "Type" is BOOK, it should be "Print books" 4. Apply patch 4.1. Repeat test, now it should show the description Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 23.05. Nice work everyone, thanks! There are extra spaces: https://snipboard.io/M90DXR.jpg |