Commit 43da0c8c authored by Thomas Sibley's avatar Thomas Sibley
Browse files

CalculateTime: Optionally accept a provided Agreement

This lets third-party code call CalculateTime directly with arbitrary
agreement definitions instead of being limited to the ones assembled
from the SLA config.  The provided agreement is expected to be similar
in all ways to the assembled ones returned by the Agreement method.
parent 5402c010
......@@ -403,8 +403,8 @@ sub Starts {
sub CalculateTime {
my $self = shift;
my %args = (@_);
my $agreement = $self->Agreement( @_ );
return undef unless $agreement;
my $agreement = $args{'Agreement'} || $self->Agreement( @_ );
return undef unless $agreement and ref $agreement eq 'HASH';
my $res = $args{'Time'};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment