[Rt-commit] rt branch, 4.6/lifecycle-ui-dev, repushed
Craig Kaiser
craig at bestpractical.com
Fri Jan 3 09:07:49 EST 2020
The branch 4.6/lifecycle-ui-dev was deleted and repushed:
was 71fc5bebba46d57fb502d070fc89ef0b17009c0e
now 2b7aa50b35e993036a2192d6140fa9b2e2453bd0
1: 71fc5bebba ! 1: 2b7aa50b35 Core lifecycle-UI
@@ -80,15 +80,21 @@
my $self = bless {}, ref($proto) || $proto;
- $self->FillCache unless keys %LIFECYCLES_CACHE;
-+ RT->System->LifecycleCacheNeedsUpdate(1);
-
+-
return $self;
}
+
@@
Name => '',
@_,
);
+ $args{'Type'} = $args{'Type'} // 'ticket';
++
++ my $needs_update = RT->System->LifecycleCacheNeedsUpdate;
++ if ( $needs_update > $lifecycle_cache_time) {
++ $self->FillCache();
++ $lifecycle_cache_time = $needs_update;
++ }
- if (defined $args{Name} and exists $LIFECYCLES_CACHE{ $args{Name} }) {
- $self->{'name'} = $args{Name};
@@ -102,12 +108,6 @@
- $self->{'type'} = $args{Type};
- } else {
- return undef;
-+ my $needs_update = RT->System->LifecycleCacheNeedsUpdate;
-+ if ($needs_update > $lifecycle_cache_time) {
-+ $self->FillCache();
-+ $lifecycle_cache_time = $needs_update;
-+ }
-+
+ my $load_class = sub {
+ if (defined $args{Name} and exists $LIFECYCLES_CACHE{ $args{Name} }) {
+ $self->{'name'} = $args{Name};
@@ -411,7 +411,8 @@
+
+ if ($update) {
+ return $self->SetAttribute(Name => 'LifecycleCacheNeedsUpdate', Content => time);
-+ } else {
++ }
++ else {
+ my $cache = $self->FirstAttribute('LifecycleCacheNeedsUpdate');
+ return (defined $cache ? $cache->Content : 0 );
+ }
More information about the rt-commit
mailing list