Skip to content

Commit

Permalink
Merge branch 'hotfix-sampleparams'
Browse files Browse the repository at this point in the history
  • Loading branch information
johnvanbreda committed Jan 18, 2024
2 parents 9b6c638 + e4bbb06 commit c898e27
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 22 deletions.
2 changes: 1 addition & 1 deletion application/config/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*
* @var string
*/
$config['version'] = '8.24.3';
$config['version'] = '8.24.4';

/**
* Version release date.
Expand Down
54 changes: 33 additions & 21 deletions application/helpers/report_standard_params_samples.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,30 +85,42 @@ public static function getParameters() {
'idlist' => array('datatype'=>'idlist', 'display'=>'List of IDs', 'emptyvalue'=>'', 'fieldname'=>'s.id', 'alias'=>'smp_id',
'description'=>'Comma separated list of sample IDs to filter to'
),
'searchArea' => array('datatype'=>'geometry', 'display'=>'Boundary',
'description'=>'Boundary to search within',
'wheres' => array(
array('value'=>'', 'operator'=>'', 'sql'=>"st_intersects(s.geom, st_makevalid(st_geomfromtext('#searchArea#',900913)))")
)
),
'smp_id' => array('datatype' => 'integer', 'display' => 'ID',
'searchArea' => [
'datatype' => 'geometry',
'display' => 'Boundary',
'description' => 'Boundary to search within, in Well Known Text format using Web Mercator projection.',
'wheres' => [
[
'sql' => "st_intersects(s.geom, st_makevalid(st_geomfromtext('#searchArea#',900913)))",
],
],
],
'smp_id' => [
'datatype' => 'integer',
'display' => 'ID',
'description' => 'Sample ID',
'wheres' => array(
array('value' => '', 'operator' => '', 'sql' => "s.id #smp_id_op# #smp_id#")
)
),
'sample_method_id' => array('datatype' => 'integer', 'display' => 'Sample Method ID',
'wheres' => [
[
'sql' => "s.id #smp_id_op# #smp_id#"
]
],
],
'sample_method_id' => [
'datatype' => 'integer',
'display' => 'Sample Method ID',
'description' => 'Termlists_terms ID for the Sample Method',
'wheres' => array(
array('value' => '', 'operator' => '', 'sql' => "s.location_name ilike replace('#location_name#', '*', '%') || '%'"),
)
),
'location_name' => array('datatype' => 'text', 'display' => 'Location name',
'wheres' => [
['sql' => "s.location_name ilike replace('#location_name#', '*', '%') || '%'"],
],
],
'location_name' => [
'datatype' => 'text',
'display' => 'Location name',
'description' => 'Name of location to filter to (starts with search)',
'wheres' => array(
array('value' => '', 'operator' => '', 'sql' => "s.location_name ilike '%#location_name#%'")
)
),
'wheres' => [
['sql' => "s.location_name ilike '%#location_name#%'"],
],
],
'location_list' => [
'datatype' => 'integer[]',
'display' => 'Location IDs',
Expand Down

0 comments on commit c898e27

Please sign in to comment.