Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

Commit 145aff4

Browse files
committed
fix report
1 parent b4e3796 commit 145aff4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src-admintool/queries/audit_ucb_query.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class AuditNewUCBQuery < AdminQuery
55
def initialize(query_factory, path, myparams)
66
super
77
@days = get_param('days', 7).to_i
8+
@mindays = 1
89
end
910

1011
def get_title
@@ -22,13 +23,15 @@ def get_sql
2223
a.status as audit_status,
2324
case
2425
when a.status in ('size-mismatch','digest-mismatch') then 'Audit Failed'
25-
when ifnull(verified, o.modified) < date_add(o.modified, interval 1 day) then 'Reset Needed'
26+
when ifnull(verified, o.modified) < date_add(o.modified, interval #{@mindays} day) and o.modified > date_add(now(), interval -#{@mindays} day) then 'Reset Later'
27+
when ifnull(verified, o.modified) < date_add(o.modified, interval #{@mindays} day) then 'Reset Needed'
2628
when a.status = 'verified' then 'Audited'
2729
else 'In Progress'
2830
end as category,
2931
case
3032
when a.status in ('size-mismatch','digest-mismatch') then 'FAIL'
31-
when ifnull(verified, o.modified) < date_add(o.modified, interval 1 day) then 'WARN'
33+
when ifnull(verified, o.modified) < date_add(o.modified, interval #{@mindays} day) and o.modified > date_add(now(), interval -#{@mindays} day) then 'INFO'
34+
when ifnull(verified, o.modified) < date_add(o.modified, interval #{@mindays} day) then 'WARN'
3235
when a.status = 'verified' then 'PASS'
3336
else 'INFO'
3437
end as status
@@ -55,7 +58,7 @@ def get_headers(_results)
5558
end
5659

5760
def get_types(_results)
58-
%w[objlist ark datetime dataint datetime '' '' '' status]
61+
%w[objlist ark datetime dataint datetime '' '' status]
5962
end
6063

6164
def get_alternative_queries

0 commit comments

Comments
 (0)