https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37684

Kyle M Hall (khall) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #171147|0                           |1
        is obsolete|                            |

--- Comment #6 from Kyle M Hall (khall) <[email protected]> ---
Created attachment 173867
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173867&action=edit
Bug 37684: Direct link to expired news are broken

When using a direct link to a news
(koha.url/cgi-bin/koha/opac-main.pl?news_id=XXX), the link is broken if the
news is expired.

Formerly, a using AdditionalContent->get( id => "my_news_id") on an
expired news was returning a news, and calling get without id was
returning all news but the expired ones.

This patch adds tests to check this behaviour by adding one expired news and
performing following new tests:
1 - It may not be returned by AdditionalContent.get()
2 - It must be returned by AdditionalContent.get() using its id

This patch fixes the behaviour by addind the new behaviour or
AdditionalContent.get:
1 - Any news must be returned by AdditionalContent.get() using its id;

TEST PLAN:
1 - Apply patch
2 - Remove the changes made to Koha/AdditionalContents.pm
3 - Run tests -> one test must fail
4 - Create a news with a expired expiration date, notice the id of the
  news in the url of the modification panel
5 - Go to "opac.url/cgi-bin/koha/opac-main.pl?news_id=MY_ID" -> notice
  it does not work
6 - Reapply the whole patch
7 - Run test -> all test must pass
8 - Go to "opac.url/cgi-bin/koha/opac-main.pl?news_id=MY_ID" -> notice
  it does work now

Signed-off-by: Olivier V <[email protected]>

Signed-off-by: Kyle M Hall <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to