Make sure that calendar time span flags are always set. Fixes bug #12271.
This commit is contained in:
parent
82603b29c7
commit
9da88844e0
4 changed files with 17 additions and 10 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
- fixed #12268: Point of sale form missing from cart screen.
|
- fixed #12268: Point of sale form missing from cart screen.
|
||||||
- fixed #12201: AssetReport - no selects.
|
- fixed #12201: AssetReport - no selects.
|
||||||
- fixed #12269: Login / Loginbox with encryptlogin
|
- fixed #12269: Login / Loginbox with encryptlogin
|
||||||
|
- fixed #12271: Calendar List View does not always show labels
|
||||||
|
|
||||||
7.10.23
|
7.10.23
|
||||||
- fixed #12225: Stock asset, multiple instances on a page
|
- fixed #12225: Stock asset, multiple instances on a page
|
||||||
|
|
|
||||||
|
|
@ -1133,7 +1133,7 @@ sub viewList {
|
||||||
);
|
);
|
||||||
|
|
||||||
### Build the event vars
|
### Build the event vars
|
||||||
my $dtLast = $dtStart; # The DateTime of the last event
|
my $dtLast = WebGUI::DateTime->new(0); # The DateTime of the last event
|
||||||
EVENT: for my $event (@events) {
|
EVENT: for my $event (@events) {
|
||||||
next EVENT unless $event && $event->canView();
|
next EVENT unless $event && $event->canView();
|
||||||
my ( %eventVar, %eventDate )
|
my ( %eventVar, %eventDate )
|
||||||
|
|
@ -1142,12 +1142,15 @@ sub viewList {
|
||||||
# Add the change flags
|
# Add the change flags
|
||||||
my $dt = $event->getDateTimeStart;
|
my $dt = $event->getDateTimeStart;
|
||||||
if ( $dt->year > $dtLast->year ) {
|
if ( $dt->year > $dtLast->year ) {
|
||||||
$eventVar{ new_year } = 1;
|
$eventVar{ new_year } = 1;
|
||||||
}
|
|
||||||
if ( $dt->month > $dtLast->month ) {
|
|
||||||
$eventVar{ new_month } = 1;
|
$eventVar{ new_month } = 1;
|
||||||
|
$eventVar{ new_day } = 1;
|
||||||
}
|
}
|
||||||
if ( $dt->day > $dtLast->day ) {
|
elsif ( $dt->month > $dtLast->month ) {
|
||||||
|
$eventVar{ new_month } = 1;
|
||||||
|
$eventVar{ new_day } = 1;
|
||||||
|
}
|
||||||
|
elsif ( $dt->day > $dtLast->day ) {
|
||||||
$eventVar{ new_day } = 1;
|
$eventVar{ new_day } = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -241,15 +241,15 @@ our $HELP = {
|
||||||
],
|
],
|
||||||
variables => [
|
variables => [
|
||||||
{
|
{
|
||||||
name => 'newYear',
|
name => 'new_year',
|
||||||
description => 'helpvar newYear',
|
description => 'helpvar newYear',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => 'newMonth',
|
name => 'new_month',
|
||||||
description => 'helpvar newMonth',
|
description => 'helpvar newMonth',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => 'newDay',
|
name => 'new_day',
|
||||||
description => 'helpvar newDay',
|
description => 'helpvar newDay',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -57,8 +57,6 @@ use Data::Dumper;
|
||||||
use WebGUI::Asset::Wobject::Calendar;
|
use WebGUI::Asset::Wobject::Calendar;
|
||||||
use WebGUI::Asset::Event;
|
use WebGUI::Asset::Event;
|
||||||
|
|
||||||
plan tests => 15 + scalar @icalWrapTests;
|
|
||||||
|
|
||||||
my $session = WebGUI::Test->session;
|
my $session = WebGUI::Test->session;
|
||||||
|
|
||||||
# Do our work in the import node
|
# Do our work in the import node
|
||||||
|
|
@ -571,6 +569,9 @@ cmp_deeply(
|
||||||
'... correct set of events in list view'
|
'... correct set of events in list view'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ok(exists $listVars->{events}->[0]->{new_year} && $listVars->{events}->[0]->{new_year}, 'first event has new_year set');
|
||||||
|
ok(exists $listVars->{events}->[0]->{new_month} && $listVars->{events}->[0]->{new_month}, 'first event has new_month set');
|
||||||
|
ok(exists $listVars->{events}->[0]->{new_day} && $listVars->{events}->[0]->{new_day}, 'first event has new_day set');
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
|
|
@ -606,3 +607,5 @@ cmp_deeply(
|
||||||
[],
|
[],
|
||||||
'but getFeeds still returns a data structure.'
|
'but getFeeds still returns a data structure.'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
done_testing;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue