Bug 32021

Summary: Pages 'appear in position' field is not useful
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: ToolsAssignee: Aleisha Amohia <aleisha>
Status: CLOSED FIXED QA Contact: Kyle M Hall (khall) <kyle>
Severity: enhancement    
Priority: P5 - low CC: aleisha, kyle, marie-luce.laflamme, matt.blenkinsop
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Trivial patch
Documentation contact: marie-luce laflamme Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/686
Text to go in the release notes:
Version(s) released in:
23.05.00
Circulation function:
Bug Depends on: 15326    
Bug Blocks:    
Attachments: Bug 32021: Only show 'appear in position' for News
Bug 32021: Don't show 'appear in position' for Pages
Bug 32021: Don't show 'appear in position' for Pages
Bug 32021: Don't show 'appear in position' for Pages

Description Caroline Cyr La Rose 2022-10-27 16:38:15 UTC
When creating a new page with the additional content page, there is a possibility of adding an 'appears in position' to the page. I think this is a leftover from the news/html customizations tool where you could have many entries in the same location and they would be ordered by 'appears in position'. However, I don't think it is useful in the case of pages and should probably be removed.
Comment 1 Aleisha Amohia 2023-02-15 02:01:07 UTC
Created attachment 146656 [details] [review]
Bug 32021: Only show 'appear in position' for News

The 'Appear in position' option isn't relevant for HTML customisations
or Pages. The option is only used by the News tool, so we should hide it
when not adding or modifying a News item.

To test:

1) Add a new HTML customisation or Page
2) Confirm the 'Appear in position' option does not show
3) Add a new News item
4) Confirm the 'Appear in position' option DOES show

Sponsored-by: Catalyst IT
Comment 2 Caroline Cyr La Rose 2023-02-15 15:13:20 UTC
Hi Aleisha,

We can have more than one HTML customization per display location. I just tried it without the patch and the 'appear in position' do change the position.

1. Go to Tools > HTML customizations
2. Click 'New entry'
3. Fill out the top form
   - Display location: OpacNavRight
   - Library: All libraries
   - Publication date: set to today
   - Expiration date: leave empty
   - Appear in position: 1
4. Enter text in the title and content for the default language
   - Title: OpacNavRight 1
   - Content: OpacNavRight 1
5. Click 'Save'
6. Redo steps 2 to 5, entering the following information for the second entry
   - Display location: OpacNavRight
   - Library: All libraries
   - Publication date: set to today
   - Expiration date: leave empty
   - Appear in position: 2
   - Title: OpacNavRight 2
   - Content: OpacNavRight 2
7. Go to the OPAC
   --> On the right, there should be OpacNavRight 1 followed by OpacNavRight 2
8. Edit the OpacNavRight 1 entry, change the Appear in position for 2 and save
9. Edit the OpacNavRight 2 entry, change the Appear in position for 1 and save
10. Go to the OPAC
   --> On the right, there should be OpacNavRight 2 followed by OpacNavRight 1

So this bug is really only for pages.

Thanks!

Caroline
Comment 3 Aleisha Amohia 2023-02-15 22:22:02 UTC
Created attachment 146704 [details] [review]
Bug 32021: Don't show 'appear in position' for Pages

The 'Appear in position' option isn't relevant for Pages, so we should
hide it when not adding or modifying a Page.

To test:

1) Add a new Page
2) Confirm the 'Appear in position' option does not show
3) Add a new News item or HTML customisation
4) Confirm the 'Appear in position' option DOES show

Sponsored-by: Catalyst IT
Comment 4 Caroline Cyr La Rose 2023-02-16 14:35:15 UTC
Created attachment 146734 [details] [review]
Bug 32021: Don't show 'appear in position' for Pages

The 'Appear in position' option isn't relevant for Pages, so we should
hide it when not adding or modifying a Page.

To test:

1) Add a new Page
2) Confirm the 'Appear in position' option does not show
3) Add a new News item or HTML customisation
4) Confirm the 'Appear in position' option DOES show

Sponsored-by: Catalyst IT
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 5 Caroline Cyr La Rose 2023-02-16 14:36:20 UTC
Thanks Aleisha!
Comment 6 Caroline Cyr La Rose 2023-02-16 14:38:41 UTC
For release maintainers, please mark as Needs documenting once you're done. I'd like to correct the manual
Comment 7 Kyle M Hall (khall) 2023-02-17 18:35:52 UTC
Created attachment 146903 [details] [review]
Bug 32021: Don't show 'appear in position' for Pages

The 'Appear in position' option isn't relevant for Pages, so we should
hide it when not adding or modifying a Page.

To test:

1) Add a new Page
2) Confirm the 'Appear in position' option does not show
3) Add a new News item or HTML customisation
4) Confirm the 'Appear in position' option DOES show

Sponsored-by: Catalyst IT
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Tomás Cohen Arazi (tcohen) 2023-03-10 14:47:55 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 9 Matt Blenkinsop 2023-03-13 11:06:04 UTC
Enhancement - not backporting to 22.11.x

Nice work everyone!