Bug 36083

Summary: Not able to create customizable areas to intranet home pages that are library specific
Product: Koha Reporter: Kelly McElligott <kelly>
Component: ToolsAssignee: Brendan Lawlor <blawlor>
Status: RESOLVED FIXED QA Contact: Laura Escamilla <Laura.escamilla>
Severity: normal    
Priority: P5 - low CC: blawlor, Laura.escamilla, lucas, martin.renvoize, samalau
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:
Attachments: Bug 36083: Fix HTML additional contents for the logged in branchcode
Bug 36083: Fix HTML additional contents for the logged in branchcode
Bug 36083: (follow-up) add USE Branches for html customizations
Bug 36083: Fix HTML additional contents for the logged in branchcode
Bug 36083: (follow-up) add USE Branches for html customizations
Bug 36083: Fix HTML additional contents for the logged in branchcode
Bug 36083: (follow-up) add USE Branches for html customizations
Bug 36083: Fix HTML additional contents for the logged in branchcode
Bug 36083: (follow-up) add USE Branches for html customizations

Description Kelly McElligott 2024-02-13 14:01:31 UTC
When testing the enhancement coming in 23.11, bug 6419, it appears that library-specific text does not display as it should with the HTML Customization tool. 
Process to test:
1. Tools> HTML Customizations
2. Choose to create an entry in StaffAcquisitionsHome
3. Assign it to a specific library 
4. Add text and publication date. 
5. Save
6. Go to the Acquisitions Home page - logged into that library, no text displays.

This enhancement does work if creating an entry for 'all libraries'.
Comment 1 Brendan Lawlor 2024-08-22 17:08:03 UTC
Created attachment 170612 [details] [review]
Bug 36083: Fix HTML additional contents for the logged in branchcode

This patch updates the calls to AdditionalContents.get() to use
Branches.GetLoggedInBranchcode instead of the logged in users
homebranch for the library parameter.

To test:
1. In Tools > HTML Customizations
2. Choose to create an entry in StaffAcquisitionsHome
3. Assign it to a specific library
   It's helpful to test with libraries other than Centerville
4. Add text and publication date (important or it will never display)
5. Save
6. Go to the Acquisitions Home page - logged into that library, no text displays.
7. Apply patch and refresh browser
8. Notice the library specifc content displays
9. Notice content created for all libraries still displays too
10. Test HTML content for specific libraries works on all 8 pages
    IntranetmainUserBlock
    Staff AcquisitionsHome
    StaffAuthoritiesHome
    StaffCataloguing Home
    StaffListsHome
    StaffPatronsHome
    StaffPOSHome
    StaffSerialsHome
Comment 2 Sam Lau 2024-08-22 18:30:57 UTC
Everything works except for StaffAuthoritiesHome
Comment 3 Brendan Lawlor 2024-08-22 19:56:41 UTC
Created attachment 170615 [details] [review]
Bug 36083: Fix HTML additional contents for the logged in branchcode

This patch updates the calls to AdditionalContents.get() to use
Branches.GetLoggedInBranchcode instead of the logged in users
homebranch for the library parameter.

To test:
1. In Tools > HTML Customizations
2. Choose to create an entry in StaffAcquisitionsHome
3. Assign it to a specific library
   It's helpful to test with libraries other than Centerville
4. Add text and publication date (important or it will never display)
5. Save
6. Go to the Acquisitions Home page - logged into that library, no text displays.
7. Apply patch and refresh browser
8. Notice the library specifc content displays
9. Notice content created for all libraries still displays too
10. Test HTML content for specific libraries works on all 8 pages
    IntranetmainUserBlock
    Staff AcquisitionsHome
    StaffAuthoritiesHome
    StaffCataloguing Home
    StaffListsHome
    StaffPatronsHome
    StaffPOSHome
    StaffSerialsHome
Comment 4 Brendan Lawlor 2024-08-22 19:56:43 UTC
Created attachment 170616 [details] [review]
Bug 36083: (follow-up) add USE Branches for html customizations
Comment 5 Brendan Lawlor 2024-08-22 20:00:59 UTC
(In reply to Sam Lau from comment #2)
> Everything works except for StaffAuthoritiesHome

Good catch. I didn't realize that page didn't include Branches
Comment 6 Sam Lau 2024-08-22 20:14:49 UTC
Created attachment 170617 [details] [review]
Bug 36083: Fix HTML additional contents for the logged in branchcode

This patch updates the calls to AdditionalContents.get() to use
Branches.GetLoggedInBranchcode instead of the logged in users
homebranch for the library parameter.

To test:
1. In Tools > HTML Customizations
2. Choose to create an entry in StaffAcquisitionsHome
3. Assign it to a specific library
   It's helpful to test with libraries other than Centerville
4. Add text and publication date (important or it will never display)
5. Save
6. Go to the Acquisitions Home page - logged into that library, no text displays.
7. Apply patch and refresh browser
8. Notice the library specifc content displays
9. Notice content created for all libraries still displays too
10. Test HTML content for specific libraries works on all 8 pages
    IntranetmainUserBlock
    Staff AcquisitionsHome
    StaffAuthoritiesHome
    StaffCataloguing Home
    StaffListsHome
    StaffPatronsHome
    StaffPOSHome
    StaffSerialsHome

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 7 Sam Lau 2024-08-22 20:14:51 UTC
Created attachment 170618 [details] [review]
Bug 36083: (follow-up) add USE Branches for html customizations

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 8 Laura Escamilla 2024-09-19 19:28:14 UTC
Created attachment 171798 [details] [review]
Bug 36083: Fix HTML additional contents for the logged in branchcode

This patch updates the calls to AdditionalContents.get() to use
Branches.GetLoggedInBranchcode instead of the logged in users
homebranch for the library parameter.

To test:
1. In Tools > HTML Customizations
2. Choose to create an entry in StaffAcquisitionsHome
3. Assign it to a specific library
   It's helpful to test with libraries other than Centerville
4. Add text and publication date (important or it will never display)
5. Save
6. Go to the Acquisitions Home page - logged into that library, no text displays.
7. Apply patch and refresh browser
8. Notice the library specifc content displays
9. Notice content created for all libraries still displays too
10. Test HTML content for specific libraries works on all 8 pages
    IntranetmainUserBlock
    Staff AcquisitionsHome
    StaffAuthoritiesHome
    StaffCataloguing Home
    StaffListsHome
    StaffPatronsHome
    StaffPOSHome
    StaffSerialsHome

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Comment 9 Laura Escamilla 2024-09-19 19:28:16 UTC
Created attachment 171799 [details] [review]
Bug 36083: (follow-up) add USE Branches for html customizations

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Comment 10 Laura Escamilla 2024-09-19 19:29:24 UTC
Created attachment 171800 [details] [review]
Bug 36083: Fix HTML additional contents for the logged in branchcode

This patch updates the calls to AdditionalContents.get() to use
Branches.GetLoggedInBranchcode instead of the logged in users
homebranch for the library parameter.

To test:
1. In Tools > HTML Customizations
2. Choose to create an entry in StaffAcquisitionsHome
3. Assign it to a specific library
   It's helpful to test with libraries other than Centerville
4. Add text and publication date (important or it will never display)
5. Save
6. Go to the Acquisitions Home page - logged into that library, no text displays.
7. Apply patch and refresh browser
8. Notice the library specifc content displays
9. Notice content created for all libraries still displays too
10. Test HTML content for specific libraries works on all 8 pages
    IntranetmainUserBlock
    Staff AcquisitionsHome
    StaffAuthoritiesHome
    StaffCataloguing Home
    StaffListsHome
    StaffPatronsHome
    StaffPOSHome
    StaffSerialsHome

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Comment 11 Laura Escamilla 2024-09-19 19:29:26 UTC
Created attachment 171801 [details] [review]
Bug 36083: (follow-up) add USE Branches for html customizations

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Comment 12 Laura Escamilla 2024-09-19 19:29:51 UTC
Great job here, Brendan! Passing QA!
Comment 13 Martin Renvoize (ashimema) 2024-09-30 14:34:01 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant
Comment 14 Lucas Gass (lukeg) 2024-11-18 22:21:19 UTC
Doesn't clean apply to 24.05.x, rebase if needed.