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

Commit bb23e3d

Browse files
committed
show campus in idlist query
1 parent c1755d1 commit bb23e3d

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src-admintool/queries/idlist_query.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ def get_sql
3636
select
3737
trim(substring_index(o.erc_where, ';', -1)) doi,
3838
o.ark,
39+
(
40+
select substring_index(c.mnemonic,'_', 1)
41+
from inv.inv_collections c
42+
inner join inv.inv_collections_inv_objects icio
43+
on icio.inv_collection_id=c.id
44+
where icio.inv_object_id=o.id
45+
limit 1
46+
) as campus,
3947
date(created),
4048
}
4149

@@ -97,7 +105,7 @@ def get_sql
97105
end
98106

99107
def get_headers(_results)
100-
arr = ['Parsed erc_where', 'Ark', 'Created']
108+
arr = ['Parsed erc_where', 'Ark', 'campus', 'Created']
101109
if @fields == 'summary'
102110
['Num Ver', 'Num File', 'Producer Files', 'Files', 'File Size', 'Producer Size'].each do |r|
103111
arr.append(r)
@@ -112,7 +120,7 @@ def get_headers(_results)
112120
end
113121

114122
def get_types(_results)
115-
arr = %w[localid ark date]
123+
arr = %w[localid ark '' date]
116124
if @fields == 'summary'
117125
%w[data data data list data data].each do |r|
118126
arr.append(r)

0 commit comments

Comments
 (0)