Set correct defaults for icalFeeds in existant calendars. Fixes bug #11005
This commit is contained in:
parent
7349cf52b8
commit
255abcdf97
3 changed files with 38 additions and 1 deletions
|
|
@ -48,6 +48,7 @@
|
||||||
- fixed #10954: DataForm fails silently
|
- fixed #10954: DataForm fails silently
|
||||||
- fixed #10950: Thingy
|
- fixed #10950: Thingy
|
||||||
- fixed #10976: Form::Date not internationalized /DateTime::setToEpoch
|
- fixed #10976: Form::Date not internationalized /DateTime::setToEpoch
|
||||||
|
- fixed #11005: calendar feed workflow
|
||||||
|
|
||||||
7.7.19
|
7.7.19
|
||||||
- fixed #10838: Forwarded forum post email to new CS adds reply to original thread
|
- fixed #10838: Forwarded forum post email to new CS adds reply to original thread
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ fixTemplateSettingsFromShunt($session);
|
||||||
addSubscribableAspect( $session );
|
addSubscribableAspect( $session );
|
||||||
addMatrixColumnDefaults($session);
|
addMatrixColumnDefaults($session);
|
||||||
addFeaturedPageWiki( $session );
|
addFeaturedPageWiki( $session );
|
||||||
|
fixEmptyCalendarIcalFeeds( $session );
|
||||||
|
|
||||||
finish($session); # this line required
|
finish($session); # this line required
|
||||||
|
|
||||||
|
|
@ -49,6 +50,19 @@ finish($session); # this line required
|
||||||
# print "DONE!\n" unless $quiet;
|
# print "DONE!\n" unless $quiet;
|
||||||
#}
|
#}
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Add the column for featured wiki pages
|
||||||
|
sub fixEmptyCalendarIcalFeeds {
|
||||||
|
my $session = shift;
|
||||||
|
print "\tSetting icalFeeds in the Calendar to the proper default... " unless $quiet;
|
||||||
|
|
||||||
|
$session->db->write(
|
||||||
|
"UPDATE Calendar set icalFeeds='[]' where icalFeeds IS NULL",
|
||||||
|
);
|
||||||
|
|
||||||
|
print "DONE!\n" unless $quiet;
|
||||||
|
}
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Add the column for featured wiki pages
|
# Add the column for featured wiki pages
|
||||||
sub addFeaturedPageWiki {
|
sub addFeaturedPageWiki {
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ use Data::Dumper;
|
||||||
use WebGUI::Asset::Wobject::Calendar;
|
use WebGUI::Asset::Wobject::Calendar;
|
||||||
use WebGUI::Asset::Event;
|
use WebGUI::Asset::Event;
|
||||||
|
|
||||||
plan tests => 14 + scalar @icalWrapTests;
|
plan tests => 15 + scalar @icalWrapTests;
|
||||||
|
|
||||||
my $session = WebGUI::Test->session;
|
my $session = WebGUI::Test->session;
|
||||||
|
|
||||||
|
|
@ -434,6 +434,28 @@ cmp_deeply(
|
||||||
'... end of day event in proper bin'
|
'... end of day event in proper bin'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
#
|
||||||
|
# getFeeds
|
||||||
|
#
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
my $feedCal = $node->addChild({
|
||||||
|
className => 'WebGUI::Asset::Wobject::Calendar',
|
||||||
|
title => 'Calendar for doing feed tests',
|
||||||
|
});
|
||||||
|
|
||||||
|
my $feedTag = WebGUI::VersionTag->getWorking($session);
|
||||||
|
$feedTag->set({name=>"Calendar Feed Test"});
|
||||||
|
WebGUI::Test->tagsToRollback($feedTag);
|
||||||
|
$feedTag->commit;
|
||||||
|
|
||||||
|
cmp_deeply(
|
||||||
|
$feedCal->getFeeds(),
|
||||||
|
[],
|
||||||
|
'getFeeds: returns an empty array ref with no feeds'
|
||||||
|
);
|
||||||
|
|
||||||
TODO: {
|
TODO: {
|
||||||
local $TODO = "Tests to make later";
|
local $TODO = "Tests to make later";
|
||||||
ok(0, 'Lots more to test');
|
ok(0, 'Lots more to test');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue