Skip to content

Commit

Permalink
Merge pre-release/2024-R5.1 into master (#859)
Browse files Browse the repository at this point in the history
* LIMS-139: link multiplex results to sample or sample group (#816)

* LIMS-1454: Show non-automatic downstream processing (#837)

* LIMS-1462: Show characterizations on Screenings tab (#844)

* LIMS-1467: Allow lab contacts to have spaces in their names (#843)

* LIMS-1489: Update message when trying to queue containers in uploaded shipments (#847)
  • Loading branch information
ndg63276 authored Nov 12, 2024
1 parent f7780e9 commit c5f958c
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 14 deletions.
4 changes: 2 additions & 2 deletions api/src/Page/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class Contact extends Page
{

public static $arg_list = array('CARDNAME' => '([\w\s\-])+',
'FAMILYNAME' => '([\w\-])+',
'GIVENNAME' => '([\w\-])+',
'FAMILYNAME' => '([\w\s\-])+',
'GIVENNAME' => '([\w\s\-])+',
'PHONENUMBER' => '.*',
'EMAILADDRESS' => '.*',
'LABNAME' => '([\w\s\-])+',
Expand Down
8 changes: 4 additions & 4 deletions api/src/Page/DC.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ function _data_collections($single = null)

$where = '';
if ($this->arg('t') == 'sc')
$where = ' AND (dc.overlap != 0 OR ifnull(et.name, dcg.experimenttype) = "Screening")';
$where = ' AND (dc.overlap != 0 OR ifnull(et.name, dcg.experimenttype) in ("Screening", "Characterization"))';
else if ($this->arg('t') == 'gr')
$where = ' AND dc.axisrange = 0';
else if ($this->arg('t') == 'fc')
$where = ' AND dc.overlap = 0 AND dc.axisrange > 0 AND dc.numberOfImages > 1 AND ifnull(et.name, dcg.experimenttype) != "Screening"';
$where = ' AND dc.overlap = 0 AND dc.axisrange > 0 AND dc.numberOfImages > 1 AND ifnull(et.name, dcg.experimenttype) not in ("Screening", "Characterization")';
} else if ($this->arg('t') == 'edge') {
$where2 = '';
} else if ($this->arg('t') == 'mca') {
Expand All @@ -139,11 +139,11 @@ function _data_collections($single = null)
$where2 = " AND es.comments LIKE '%_FLAG_%'";
$where4 = " AND xrf.comments LIKE '%_FLAG_%'";
} else if ($this->arg('t') == 'ap') {
$where = ' AND app.processingstatus = 1';
$where = " AND ifnull(et.name, dcg.experimenttype) not in ('Screening', 'Characterization') AND app.processingstatus = 1";
$extj[0] .= "INNER JOIN autoprocintegration ap ON dc.datacollectionid = ap.datacollectionid
INNER JOIN autoprocprogram app ON app.autoprocprogramid = ap.autoprocprogramid";
} else if ($this->arg('t') == 'ph') {
$where = " AND app.processingstatus = 1 AND app.processingprograms in ('big_ep', 'fast_ep')";
$where = " AND ifnull(et.name, dcg.experimenttype) not in ('Screening', 'Characterization') AND app.processingstatus = 1 AND app.processingprograms in ('big_ep', 'fast_ep')";
$extj[0] .= "INNER JOIN processingjob pj ON dc.datacollectionid = pj.datacollectionid
INNER JOIN autoprocprogram app ON app.processingjobid = pj.processingjobid";
} else if ($this->arg('t') == 'err') {
Expand Down
15 changes: 12 additions & 3 deletions api/src/Page/Processing.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function _autoproc_status($where, $ids) {
INNER JOIN processingjob pj ON pj.datacollectionid = dc.datacollectionid
INNER JOIN autoprocprogram app ON pj.processingjobid = app.processingjobid
LEFT OUTER JOIN autoprocintegration api ON api.autoprocprogramid = app.autoprocprogramid
WHERE $where AND api.autoprocintegrationid IS NULL AND pj.automatic = 1
WHERE $where AND api.autoprocintegrationid IS NULL
AND app.processingprograms NOT IN ('$filter')",
),
$ids
Expand Down Expand Up @@ -697,11 +697,17 @@ private function _autoprocessing_query_builder($where, $group, $order = '') {
ap.refinedcell_alpha as cell_al,
ap.refinedcell_beta as cell_be,
ap.refinedcell_gamma as cell_ga,
(SELECT COUNT(api1.autoprocintegrationid) FROM autoprocintegration api1 WHERE api1.autoprocprogramid = app.autoprocprogramid) as imagesweepcount,
(SELECT COUNT(api1.autoprocintegrationid) FROM autoprocintegration api1 WHERE api1.autoprocprogramid = app.autoprocprogramid) as imagesweepcount,
app.processingstatus,
app.processingmessage,
count(distinct pjis.datacollectionid) as dccount,
max(pjis.processingjobid) as processingjobid,
(SELECT IFNULL(blsg.name, bls.name) FROM processingjobparameter pjp
LEFT OUTER JOIN blsample bls ON pjp.parametervalue = bls.blsampleid
LEFT OUTER JOIN blsamplegroup blsg ON pjp.parametervalue = blsg.blsamplegroupid
WHERE pjp.processingjobid = pj.processingjobid
AND pjp.parameterkey in ('sample_id', 'sample_group_id')
) as groupname,
pj.automatic";

$from = "FROM autoprocintegration api";
Expand Down Expand Up @@ -751,7 +757,7 @@ private function _format_auto_processing_result($table_rows, $messages_result) {
'cell_ga',
);
$resolution_data = array('rlow', 'rhigh');
$returned_keys = array('PROCESSINGJOBID', 'IMAGESWEEPCOUNT', 'DCCOUNT', 'TYPE', 'PROCESSINGSTATUS', 'PROCESSINGMESSAGE');
$returned_keys = array('PROCESSINGJOBID', 'IMAGESWEEPCOUNT', 'DCCOUNT', 'TYPE', 'PROCESSINGSTATUS', 'PROCESSINGMESSAGE', 'GROUPNAME');

foreach($table_rows as &$row) {
if (!array_key_exists($row['AUTOPROCPROGRAMID'], $formatted_result)) {
Expand All @@ -772,6 +778,9 @@ private function _format_auto_processing_result($table_rows, $messages_result) {
$prefix = preg_match('/multi/', $value) ? '' : 'multi-';
$value = $row['DCCOUNT'] . 'x ' . $prefix . $value;
}
if ($row['GROUPNAME']) {
$value .= ' ('.$row['GROUPNAME'].')';
}
}


Expand Down
4 changes: 2 additions & 2 deletions client/src/js/models/labcontact.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ define(['backbone'], function(Backbone) {
},
FAMILYNAME: {
required: true,
pattern: 'wwdash',
pattern: 'wwsdash',
},
GIVENNAME: {
required: true,
pattern: 'wwdash',
pattern: 'wwsdash',
},
PHONENUMBER: {
required: true,
Expand Down
4 changes: 2 additions & 2 deletions client/src/js/modules/shipment/models/dispatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ define(['backbone'], function(Backbone) {

GIVENNAME: {
required: function () {return this.dispatchDetailsRequired},
pattern: 'wwdash',
pattern: 'wwsdash',
},

FAMILYNAME: {
required: function () {return this.dispatchDetailsRequired},
pattern: 'wwdash',
pattern: 'wwsdash',
},

PHONENUMBER: {
Expand Down
2 changes: 2 additions & 0 deletions client/src/js/modules/shipment/views/dispatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ define(['marionette', 'views/form',
this.dispatchCountry = this.ui.country.val()
this.ui.courierSection.show();
this.ui.dispatchDetails.show();
this.model.visitRequired = true
this.model.dispatchDetailsRequired = true
this.ui.submit.show();
if (
Expand Down Expand Up @@ -334,6 +335,7 @@ define(['marionette', 'views/form',
){
this.model.visitRequired = false
this.ui.dispatchDetails.hide()
this.model.dispatchDetailsRequired = false
this.ui.submit.text("Proceed")
this.ui.shippingadvice.html("<mark>On clicking 'Proceed' you will be redirected to the new Diamond shipping service to book the shipment. Please ensure all stages of the form are completed.</mark><br /><br />")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
v-model="QUEUEFORUDC"
name="Queue For UDC"
/>
<span v-else-if="shippingSafetyLevel === null">
Cannot queue container until shipment safety level is set
</span>
<span v-else>
Cannot queue containers in {{ shippingSafetyLevel }} shipments
</span>
Expand Down Expand Up @@ -663,7 +666,7 @@ export default {
await this.$store.dispatch('samples/save', containerId)
this.$store.commit('notifications/addNotification', {
message: `New Container created, click <a href=/containers/cid/${containerId}>here</a> to view it`,
message: `New Container created, click <a href=/containers/cid/${containerId}>here</a> to view it. Remember to add sequences and PDBs if needed.`,
level: 'info',
persist: true
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@
@click="onUnQueueContainer"
><i class="fa fa-times" /> Unqueue</a>
</span>
<span v-else-if="shippingSafetyLevel === null">
Cannot queue container until shipment safety level is set
</span>
<span v-else-if="shippingSafetyLevel != 'Green'">
Cannot queue containers in {{ shippingSafetyLevel }} shipments
</span>
Expand Down

0 comments on commit c5f958c

Please sign in to comment.