Skip to content

Commit

Permalink
Filtered out compound VCs from download reports
Browse files Browse the repository at this point in the history
Faked “compound” VCs, used to allocate verifiers e.g. to Sussex or
Yorkshire, were causing duplication in download report outputs. Fixed.
  • Loading branch information
johnvanbreda committed Nov 25, 2015
1 parent 69eb509 commit 1a0cf5b
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion reports/library/occurrences/filterable_nbn_exchange.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ select #columns#
from cache_occurrences o
join samples s on s.id=o.sample_id
left join (index_locations_samples ils
join locations vc on vc.id=ils.location_id
join locations vc on vc.id=ils.location_id and coalesce(vc.code, '') not like '%+%'
join cache_termlists_terms ctt on ctt.id=vc.location_type_id and ctt.term='Vice County'
) on ils.sample_id=o.sample_id and ils.contains=true
left join groups g1 on g1.id=o.group_id and g1.deleted=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
JOIN cache_taxa_taxon_lists cttl on cttl.id=o.taxa_taxon_list_id
JOIN samples s on s.id=o.sample_id AND s.deleted=false
LEFT JOIN (index_locations_samples ils
JOIN locations vc on vc.id=ils.location_id
JOIN locations vc on vc.id=ils.location_id and coalesce(vc.code, '') not like '%+%'
JOIN cache_termlists_terms ctt on ctt.id=vc.location_type_id AND ctt.term='Vice County'
) on ils.sample_id=o.sample_id and ils.contains=true
LEFT JOIN (occurrence_attribute_values det_full_val
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
JOIN occurrences occ on occ.id=o.id and occ.deleted=false -- to get comments
JOIN samples s on s.id=o.sample_id AND s.deleted=false
LEFT JOIN (index_locations_samples ils
JOIN locations vc on vc.id=ils.location_id
JOIN locations vc on vc.id=ils.location_id and coalesce(vc.code, '') not like '%+%'
JOIN cache_termlists_terms ctt on ctt.id=vc.location_type_id AND ctt.term='Vice County'
) on ils.sample_id=o.sample_id and ils.contains=true
LEFT JOIN (occurrence_attribute_values det_full_val
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
JOIN cache_taxa_taxon_lists cttl on cttl.id=o.taxa_taxon_list_id
JOIN samples s on s.id=o.sample_id AND s.deleted=false
LEFT JOIN (index_locations_samples ils
JOIN locations vc on vc.id=ils.location_id
JOIN locations vc on vc.id=ils.location_id and coalesce(vc.code, '') not like '%+%'
JOIN cache_termlists_terms ctt on ctt.id=vc.location_type_id AND ctt.term='Vice County'
) on ils.sample_id=o.sample_id and ils.contains=true
LEFT JOIN (occurrence_attribute_values det_full_val
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
JOIN cache_taxa_taxon_lists cttl on cttl.id=o.taxa_taxon_list_id
JOIN samples s on s.id=o.sample_id AND s.deleted=false
LEFT JOIN (index_locations_samples ils
JOIN locations vc on vc.id=ils.location_id
JOIN locations vc on vc.id=ils.location_id and coalesce(vc.code, '') not like '%+%'
JOIN cache_termlists_terms ctt on ctt.id=vc.location_type_id AND ctt.term='Vice County'
) on ils.sample_id=o.sample_id and ils.contains=true
LEFT JOIN (occurrence_attribute_values det_full_val
Expand Down
2 changes: 1 addition & 1 deletion reports/library/occurrences/nbn_exchange.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ from cache_occurrences co
join occurrences o on o.id=co.id -- ensure we have the latest status. Would not be needed if cache_occurrences reflects updated immediately
join samples s on s.id=o.sample_id
left join (index_locations_samples ils
join locations l on l.id=ils.location_id
join locations l on l.id=ils.location_id and coalesce(l.code, '') not like '%+%'
join cache_termlists_terms ctt on ctt.id=l.location_type_id and ctt.term='Vice County'
) on ils.sample_id=co.sample_id
#agreements_join#
Expand Down
2 changes: 1 addition & 1 deletion reports/library/occurrences/nbn_exchange_by_input_date.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ from cache_occurrences co
join occurrences o on o.id=co.id -- ensure we have the latest status. Would not be needed if cache_occurrences reflects updated immediately
join samples s on s.id=o.sample_id
left join (index_locations_samples ils
join locations l on l.id=ils.location_id
join locations l on l.id=ils.location_id and coalesce(l.code, '') not like '%+%'
join cache_termlists_terms ctt on ctt.id=l.location_type_id and ctt.term='Vice County'
) on ils.sample_id=co.sample_id
#agreements_join#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ from cache_occurrences co
join occurrences o on o.id=co.id -- ensure we have the latest status. Would not be needed if cache_occurrences reflects updated immediately
join samples s on s.id=o.sample_id
left join (index_locations_samples ils
join locations l on l.id=ils.location_id
join locations l on l.id=ils.location_id and coalesce(l.code, '') not like '%+%'
join cache_termlists_terms ctt on ctt.id=l.location_type_id and ctt.term='Vice County'
) on ils.sample_id=co.sample_id
#agreements_join#
Expand Down

0 comments on commit 1a0cf5b

Please sign in to comment.