Order books by metadata value in the collection manager UI
Context
From information provided in documentation issue #186
Proposal
The same logic implemented for ordering chapters within a book applies to ordering books within a collection. All ordering is automatic. There are three options for the "Order book by" setting:
- Title
- Publication date -- ascending
- Volume -- descending
Table of books
- column: Volume / Issue number in series, -- this should only display when this ordering option is selected
- column: publication date, -- this should only display when this ordering option is selected
If the ordering value is missing, follow the same implementation done for chapter-processed books:
- If the book does not belong to a "custom title" group, place the book at the top of the collection manager table and show "TOC?" icon
- If the book does belong to a "custom title" group, place the book at the top of the group and show "TOC?" icon.
Design
QA Steps to test that ordering functionality is working as expected
Testing 'Order books by' 'Title' selected
Testing 'Order books by' 'Title' selected
- Go into an existing collection,
- Go into the Collection settings.
- In the Collection settings menu, use the settings shown in the screenshot above, with 'Order books by' 'Title' selected.
- Save your settings and close the settings modal.
- In the Collection manager page, your books will now ordered by Title by A-Z, as in the screenshot below. The Volume / Issue number in series and the publication date will not display in the Collection modal since 'Order Books by' 'Title' is selected, as in the screenshot below.
Testing 'Order books by' 'Volume / Issue number in series' selected
Order books by' 'Volume / Issue number in series
- Go into an existing collection that has books with Volume numbers (or add Volume numbers to books in an existing collection by going into each book's metadata, or add a new collection if you don't have one already)
- Go into the Collection settings.
- In the Collection settings menu, use the settings shown in the screenshot above, with 'Order books by' 'Volume / Issue number in series' selected
- Save your settings and close the settings modal
- In the Collection manager page, your books will now ordered by Volume / Issue number in series and the number of the volume or issue will appear on the left of the page, next to the book-type icon, as in the screenshot below. The publication date should not display in the Collection manager since 'Volume / Issue number in series' is selected, as in the screenshot below.
Testing 'Order books by' 'Publication date' selected
Testing 'Order books by' 'Publication date' selected
- Go into an existing collection that has books with publication dates (or add publication dates to books in an existing collection by going into each book's metadata)
- Go into the Collection settings
- In the Collection settings menu, use the settings shown in the screenshot above, with 'Order books by' 'Publication date' selected
- Save your settings and close the settings modal
- In the Collection manager page, your books will now ordered by Publication date which is shown to the right of each book's title, as in the screenshot below. The Volume / Issue number in series should not display in the Collection manager since 'Publication date' is selected, as in the screenshot below
Testing 'Group books on TOC' with 'Group books by' 'Custom Group Titles' setting selected, and 'Order books by' with any of the available options selected
Testing 'Group books on TOC' with 'Group books by' 'Custom Group Titles' setting selected, and 'Order books by' with any of the available options selected
- Go into an existing collection that has books with publication dates and volume numbers (or add publication dates and volume numbers to books in an existing collection by going into each book's metadata)
- Go into the Collection settings.
- In the Collection settings menu, use the settings shown in the screenshot above, with the 'Group books on TOC' toggle on, 'Group books by' 'Custom title' selected, and 'Order books by' with any of the ordering options selected.
- Save your settings and close the settings modal.
- Back in the Collection manager page, click 'Add Group' and fill in your group's name. Do this twice to create two different Groups in the collection.
- Select some books (use the checkboxes to the left of the book name) and then place them within the first Group by clicking the 'Move' button, and then selecting the group you want them moved into, as shown in the screenshot below.
- Now place some books in the second group by following the same process as in the previous step.
- Notice that within each Custom Title Group, the 'Order books by' setting you selected in Collection Settings should apply. For example, within a group, books will be ordered by Publication date when 'Order books by' 'Publication date' is selected in the Collection Settings, and books will be ordered by Volume / Issue number in Series when 'Order books by' 'Volume / Issue number in Series' is selected in the Collection Settings. In other words, within groups, the book ordering behaviour set in Collection Settings applies.
Testing 'Group books on TOC' when 'Group books by' is using any setting *other than* 'Custom Group Titles'
Testing 'Group books on TOC' when 'Group books by' is using any setting other than 'Custom Group Titles' (i.e. with either 'Year', 'Volume / Issue number in series', 'Current-Archived', 'Year and Current-Archived' selected), and 'Order books by' with any of the available options selected.
- In the Collection Settings modal for an existing collection, make sure the 'Group books on TOC' toggle is on
- Still in the Collection Settings modal, give the 'Group books by' setting any setting other than 'Custom Group Titles', and give 'Order books by' any of the available options
- Save the settings and go back to the Collection page
- Make sure your collection is published
- Notice that you don't see the group name in the Collection manager page when the 'Group by' option has either 'Year', 'Volume / Issue number in series', 'Current-Archived', or 'Year and Current-Archived' selected in Collection Settings. These group names are automatically created by NCBI from the book metadata. You will only see the group names for these 'Group by' setting selections when the collection is actually published, by referring to the 'TOC' on the top-right of the Collection manager page, and then referring to the 'Live' tab once it has been published, as shown below (where 'Group by' 'Year' is selected, so books are automatically grouped into 2022).
Testing display when 'Group books on TOC' is on, 'Group books by' 'Custom Group Titles' is selected, and ordering value is missing for the relevant ordering type selected in 'Order books by'
Testing display when 'Group books on TOC' is on, 'Group books by' 'Custom Group Titles' is selected, and ordering value is missing for the relevant ordering type selected in 'Order books by' (for example when Order books by' 'Volume / Issue number in series' is selected and a book doesn't have a Volume or Issue number).
- Turn on the settings for the Collection as shown in the first screenshot below, save your settings and then exit the Collection Settings modal.
- Create a Custom Title Group from the Collection page, by clicking 'Add group', filling in and saving your group name.
- Now move books into the Custom Title Group by selecting them and clicking the 'Move' button on the bottom-left of the screen, as shown in the second and third screenshots below. (Note: the third screenshot text should say 'Books' instead of 'Chapters' we have logged this in issue #1066 (closed) ).
- Go into one or two of the books and remove the 'Volume/Issue' number (which is being used for ordering in this case) from the book's metadata modal, as shown in the third screenshot below, and then save and close the metadata modal.
- Go back to the Collection manager page, and notice that 'TOC?' has been added beside the book(s) that don't have the ordering value in their metadata, and the book(s) appears at the top of the group (note: tooltip text will be added to the 'TOC?' icon, and it will be made red, to indicate the issue to users more clearly. This feature is in development).
Testing display when 'Group books on TOC' is off, and ordering value is missing for the relevant ordering type selected in 'Order books by'
Testing display when 'Group books on TOC' is off, and ordering value is missing for the relevant ordering type selected in 'Order books by' (for example when 'Order books by' 'Volume / Issue number in series' is selected and a book doesn't have a Volume or Issue number.
- Go into Collection settings, make sure the 'Group books on TOC' toggle is off, and choose 'Order books by' 'Volume / Issue number in series' (as shown in the first screenshot below)
- Save the settings and close the Collection Settings modal.
- Remove the ordering value from one or more of the books (i.e. delete the 'Volume / Issue number in series' value in the book's metadata) as shown in the second screenshot below, and save the metadata modal page.
- Go back to the Collection manager page, and notice that 'TOC?' has been added beside the book that doesn't have the relevant ordering value in its metadata, and the book appears at the top of the table (note: tooltip text will be added to the 'TOC?' icon, and it will be made red, to indicate the issue to users more clearly. This feature is in development).