Bug 31450 - HTML customizations and News will not display on OPAC without Publication date
Summary: HTML customizations and News will not display on OPAC without Publication date
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Lucas Gass (lukeg)
QA Contact: Testopia
URL:
Keywords:
: 32987 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-08-24 14:21 UTC by Lucas Gass (lukeg)
Modified: 2024-07-23 21:47 UTC (History)
3 users (show)

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


Attachments
Bug 31450 - HTML customizations and News will not display on OPAC without Publication date (2.14 KB, patch)
2022-08-26 12:30 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 31450 - HTML customizations and News will not display on OPAC without Publication date (1.53 KB, patch)
2022-08-26 12:32 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 31450: HTML customizations and News will not display on OPAC without Publication date (2.14 KB, patch)
2023-02-18 11:46 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31450: Remove some debug lines (951 bytes, patch)
2023-02-18 11:46 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31450: HTML customizations and News will not display on OPAC without Publication date (2.21 KB, patch)
2023-02-18 17:36 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 31450: Remove some debug lines (1003 bytes, patch)
2023-02-18 17:36 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 31450: (follow-up) Add hint about empty publication date (3.06 KB, patch)
2023-02-18 17:36 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 31450: HTML customizations and News will not display on OPAC without Publication date (2.17 KB, patch)
2024-06-14 17:39 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 31450: Remove some debug lines (688 bytes, patch)
2024-06-14 17:39 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 31450: (follow-up) Add hint about empty publication date (2.70 KB, patch)
2024-06-14 17:39 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2022-08-24 14:21:47 UTC
To recreate:

-Create some HTML Customizations and some News item that are set to display on the OPAC.
-Go to the OPAC and notice none of these display. 

Possibly from Bug 15326?
Comment 1 Lucas Gass (lukeg) 2022-08-24 20:27:38 UTC
I see that this only happens when I do not set a "Publication date:". That makes sense for News, but HTML customizations should not required a Publication date or an Expiration date
Comment 2 Paul Derscheid 2022-08-26 12:30:08 UTC Comment hidden (obsolete)
Comment 3 Paul Derscheid 2022-08-26 12:32:45 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2022-11-16 23:46:38 UTC
Hi Paul, could you please check the patch? It only seems to be removing some debug lines.
Comment 5 Caroline Cyr La Rose 2023-02-15 15:28:56 UTC
I think the obsoleted patch wasn't supposed to be?
Comment 6 Katrin Fischer 2023-02-18 11:08:28 UTC
*** Bug 32987 has been marked as a duplicate of this bug. ***
Comment 7 Katrin Fischer 2023-02-18 11:44:02 UTC
If the commit line is exactly the same, one patch will overwrite the other. I'll fix it.
Comment 8 Katrin Fischer 2023-02-18 11:46:07 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2023-02-18 11:46:09 UTC Comment hidden (obsolete)
Comment 10 Owen Leonard 2023-02-18 17:36:29 UTC Comment hidden (obsolete)
Comment 11 Owen Leonard 2023-02-18 17:36:32 UTC Comment hidden (obsolete)
Comment 12 Owen Leonard 2023-02-18 17:36:34 UTC Comment hidden (obsolete)
Comment 13 Caroline Cyr La Rose 2023-02-20 15:09:39 UTC
With the patch, my HTML customization with publication date in the future is displayed.

Without the patch

HTML customization - pub date today    - Displayed     - OK
HTML customization - pub date tomorrow - Not displayed - OK
HTML customization - no pub date       - Not displayed - Not OK
News               - pub date today    - Displayed     - OK
News               - pub date tomorrow - Not displayed - OK
News               - no pub date       - Not displayed - OK

With the patch

HTML customization - pub date today    - Displayed     - OK
HTML customization - pub date tomorrow - Displayed     - Not OK
HTML customization - no pub date       - Displayed     - OK
News               - pub date today    - Displayed     - OK
News               - pub date tomorrow - Not displayed - OK
News               - no pub date       - Not displayed - OK

https://snipboard.io/H8rGQj.jpg
Comment 14 Katrin Fischer 2023-02-20 20:22:23 UTC
Setting to failed QA - I believe if a pubdate is set, it should be respected.
Comment 15 Owen Leonard 2024-06-14 17:39:14 UTC
Created attachment 167754 [details] [review]
Bug 31450: HTML customizations and News will not display on OPAC without Publication date

To test:
1) Create some HTML Customizations and some News items that are
   set to display on the OPAC. Create one of each: [ 'With
   publication date today', 'With publication date in the future',
   'Without publication date' ]
2) Note that news with publication date 'today' will display; with
   publication date 'in the future' will not display; with
   publication date unset will not display.
3) Note that html_customizations with date 'today' will display;
   with publication date 'in the future' will not display;
   with publication date unset will display.
4) Sign-Off

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 16 Owen Leonard 2024-06-14 17:39:16 UTC
Created attachment 167755 [details] [review]
Bug 31450: Remove some debug lines

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 17 Owen Leonard 2024-06-14 17:39:19 UTC
Created attachment 167756 [details] [review]
Bug 31450: (follow-up) Add hint about empty publication date

This patch adds a hint to the additional contents form when the
user is adding a news item, "News without a publication date will
not display."

This patch also makes to extra changes: Changing the grammatically
incorrect heading "Modify an additional content" to "Modify
additional content."

The patch also splits the expiration date hint into two separate
div.hint containers for better readability.

To test, apply the patch and add a new news item. You should see
the new hint under the publication date field.

Try adding an HTML customization. The hint should not appear.
Comment 18 Owen Leonard 2024-06-14 17:40:11 UTC
Rebased, but comment 13 is still valid:

> With the patch
> 
> HTML customization - pub date today    - Displayed     - OK
> HTML customization - pub date tomorrow - Displayed     - Not OK
> HTML customization - no pub date       - Displayed     - OK
> News               - pub date today    - Displayed     - OK
> News               - pub date tomorrow - Not displayed - OK
> News               - no pub date       - Not displayed - OK
Comment 19 Sam Lau 2024-07-23 21:44:04 UTC
Wouldn't it be possible and slightly easier just to make the publication date field required so it has to have data before submitting? Or is the issue here more so that it shouldn't even be required in the first place?
Comment 20 Lucas Gass (lukeg) 2024-07-23 21:47:23 UTC
(In reply to Sam Lau from comment #19)
> Wouldn't it be possible and slightly easier just to make the publication
> date field required so it has to have data before submitting? Or is the
> issue here more so that it shouldn't even be required in the first place?

I think making the field required is a simple and effective solution to the problem.