Class: SubmissionPool

Inherits:
ApplicationRecord show all
Defined in:
app/models/submission_pool.rb

Overview

SubmissionPools are designed to view submissions in the context of a particular asset

Defined Under Namespace

Modules: Association

Instance Method Summary collapse

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Warren::BroadcastMessages

#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren

Instance Method Details

#plates_in_submissionObject

JG [2018-10-12] LIMITATION: This currently uses the first request in a submission, so could cause confusion if we have, say, cherry-picking requests upstream of library creation. We currently have no submission templates like this active. This value is used to work out if we have a cross-plate pool and therefore need UDIs. Two things are likely to happen soon which make this concern redundant: 1) We'll switch to UDIs only -> Actually there at time of writing, but there may be one more lot of 168s comming in 2) Limber will be making the decision itself more directly It was agreed with Jamie that it was more important to detect clashes than it was to handle unlikely possible future scenarios.


37
38
39
# File 'app/models/submission_pool.rb', line 37

def plates_in_submission
  outer_request&.submission_plate_count || 0 # If all requests have been cancelled, we can ignore the submission.
end

#used_tag2_layout_templatesObject


41
42
43
# File 'app/models/submission_pool.rb', line 41

def used_tag2_layout_templates
  tag2_layout_templates.map { |template| { 'uuid' => template.uuid, 'name' => template.name } }
end

#used_tag_layout_templatesObject


45
46
47
# File 'app/models/submission_pool.rb', line 45

def used_tag_layout_templates
  tag_layout_templates.map { |template| { 'uuid' => template.uuid, 'name' => template.name } }
end