[open-ils-commits] [GIT] Evergreen ILS branch rel_3_4 updated. ffdf63e9f79d8ae85cf7dfd2a6d43b837f4f9ae6
Evergreen Git
git at git.evergreen-ils.org
Fri Jul 31 17:53:55 EDT 2020
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_3_4 has been updated
via ffdf63e9f79d8ae85cf7dfd2a6d43b837f4f9ae6 (commit)
from 70856ddb9fcccc997677eb64890ca2e8713f4fe5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ffdf63e9f79d8ae85cf7dfd2a6d43b837f4f9ae6
Author: Mike Rylander <mrylander at gmail.com>
Date: Tue Jun 30 15:33:23 2020 -0400
LP#1885759: Count months and quarters across year boundaries
We need to add year-multiples of months or quarters when using the
months_ago or quarters_ago transforms in the reporter.
Signed-off-by: Mike Rylander <mrylander at gmail.com>
Signed-off-by: Rogan Hamby <rogan.hamby at gmail.com>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm b/Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm
index d98a04fa25..0bf90ebbec 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm
@@ -740,7 +740,8 @@ package OpenILS::Reporter::SQLBuilder::Column::Transform::months_ago;
sub toSQL {
my $self = shift;
- return 'EXTRACT(MONTH FROM AGE(NOW(),"' . $self->{_relation} . '"."' . $self->name . '"))';
+ return '(EXTRACT(YEAR FROM AGE(NOW(),"' . $self->{_relation} . '"."' . $self->name . '")) * 12) +'.
+ ' EXTRACT(MONTH FROM AGE(NOW(),"' . $self->{_relation} . '"."' . $self->name . '"))';
}
sub is_aggregate { return 0 }
@@ -762,7 +763,8 @@ package OpenILS::Reporter::SQLBuilder::Column::Transform::quarters_ago;
sub toSQL {
my $self = shift;
- return 'EXTRACT(QUARTER FROM AGE(NOW(),"' . $self->{_relation} . '"."' . $self->name . '"))';
+ return '(EXTRACT(YEAR FROM AGE(NOW(),"' . $self->{_relation} . '"."' . $self->name . '")) * 4) +'.
+ ' EXTRACT(QUARTER FROM AGE(NOW(),"' . $self->{_relation} . '"."' . $self->name . '"))';
}
sub is_aggregate { return 0 }
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list