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

alias_association, convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Squishify

extended

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.



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

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



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

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

#used_tag_layout_templatesObject



49
50
51
# File 'app/models/submission_pool.rb', line 49

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