[Koha-bugs] [Bug 17960] Rename opac_news.new with opac_news.content

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 2 10:46:26 CET 2017


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

--- Comment #10 from Josef Moravec <josef.moravec at gmail.com> ---
Created attachment 59773
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59773&action=edit
[SIGNED-OFF] Bug 17960: Rename opac_news.new with opac_news.content

The field opac_news.new is very confusing and should be renamed.
If you want to access it via Koha::NewsItem you will have trouble:

  use Koha::News;
  my $news_item = Koha::News->next;
  say $news_item->new;

=> Attempt to bless into a reference at /home/vagrant/kohaclone/Koha/Object.pm
line 78.

This patchset is going to rename this DB field to opac_news_content instead.

Since the opac_news.new can be used in notice templates, we need to warn the
user during the update DB process that some templates must be updated.

Test plan:
0/ Apply the first patch "Add a test to highlight the issue" and confirm that
the test fail
1/ Apply this second patch
2/ Execute the DB entry
3/ Confirm that you get a warning if at least one of your notice templates is
using opac_news.new
4/ Confirm that the test new pass
5/ Add/update and delete a news
6/ Confirm that the RSS new feed still works as expected

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list