From 0be02d94facae7aa8e9d08d63cd0008fa5091b6b Mon Sep 17 00:00:00 2001 From: Mark Williams Date: Mon, 1 Jul 2024 12:03:23 +0100 Subject: [PATCH] LIMS-1240: Dont use shortComments LIKE 'EDNA%' --- api/src/Page/Sample.php | 4 ++-- api/src/Page/Stats.php | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/api/src/Page/Sample.php b/api/src/Page/Sample.php index 059eeb03b..105cd6527 100644 --- a/api/src/Page/Sample.php +++ b/api/src/Page/Sample.php @@ -818,7 +818,7 @@ private function get_sub_samples_query($where, $first_inner_select_where = '', $ LEFT OUTER JOIN screening sc ON dc.datacollectionid = sc.datacollectionid LEFT OUTER JOIN screeningoutput so ON sc.screeningid = so.screeningid - LEFT OUTER JOIN screeningstrategy st ON st.screeningoutputid = so.screeningoutputid AND sc.shortcomments LIKE '%EDNA%' + LEFT OUTER JOIN screeningstrategy st ON st.screeningoutputid = so.screeningoutputid AND sc.programversion = 'EDNA MXv1' LEFT OUTER JOIN screeningstrategywedge ssw ON ssw.screeningstrategyid = st.screeningstrategyid LEFT OUTER JOIN autoprocintegration ap ON ap.datacollectionid = dc.datacollectionid @@ -1208,7 +1208,7 @@ function _samples() LEFT OUTER JOIN screening sc ON dc.datacollectionid = sc.datacollectionid LEFT OUTER JOIN screeningoutput so ON sc.screeningid = so.screeningid - LEFT OUTER JOIN screeningstrategy st ON st.screeningoutputid = so.screeningoutputid AND sc.shortcomments LIKE '%EDNA%' + LEFT OUTER JOIN screeningstrategy st ON st.screeningoutputid = so.screeningoutputid AND sc.programVersion = 'EDNA MXv1' LEFT OUTER JOIN screeningstrategywedge ssw ON ssw.screeningstrategyid = st.screeningstrategyid LEFT OUTER JOIN autoprocintegration ap ON ap.datacollectionid = dc.datacollectionid diff --git a/api/src/Page/Stats.php b/api/src/Page/Stats.php index 652abfd1d..3aaf1abed 100644 --- a/api/src/Page/Stats.php +++ b/api/src/Page/Stats.php @@ -260,8 +260,12 @@ function _pipelines() { $t = $this->has_arg('t') ? $this->arg('t') : 'ai'; - if (array_key_exists($t, $types)) $this->$types[$t](); - else $this->_error('No such stat type'); + if (array_key_exists($t, $types)) { + $func = $types[$t]; + $this->$func(); + } else { + $this->_error('No such stat type'); + } } @@ -275,7 +279,7 @@ function _auto_indexing() { INNER JOIN datacollectiongroup dcg ON dcg.datacollectiongroupid = dc.datacollectiongroupid INNER JOIN blsession ses ON ses.sessionid = dcg.sessionid INNER JOIN v_run vr ON (ses.startdate BETWEEN vr.startdate AND vr.enddate) - WHERE s.shortcomments LIKE 'EDNA%' AND TIMESTAMPDIFF('SECOND', dc.endtime, s.bltimestamp) < 10000 + WHERE s.shortcomments LIKE 'Strategy%' AND TIMESTAMPDIFF('SECOND', dc.endtime, s.bltimestamp) between 0 and 10000 AND ses.beamlinename in ('$bls') GROUP BY s.shortcomments, vr.run ORDER BY vr.run