Skip to content

Commit

Permalink
feat(hiseq): sets superceded_by_id to -2 (unknown) for hiseq submissi…
Browse files Browse the repository at this point in the history
…on templates in seed data
  • Loading branch information
BenTopping committed Jul 29, 2024
1 parent ec8a4a7 commit a8d8180
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/illumina_c/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,15 @@ def skip_cherrypick=(skip)
def each_submission_template
cherrypick_options.each do |cherrypick|
sequencing.each do |sequencing_request_type|
# Hiseq templates are hidden as of Y24-181 so we set them as superceeded by unknown
# This allows us to keep the template in case it needs to be restored but not make it visible
superceded_by_id = sequencing_request_type&.name&.downcase&.include?('hiseq') ? -2 : -1
yield(
{
name: name_for(cherrypick, sequencing_request_type),
submission_class_name: 'LinearSubmission',
submission_parameters: submission_parameters(cherrypick, sequencing_request_type),
superceded_by_id:,
product_line_id: ProductLine.find_by(name: PIPELINE).id,
product_catalogue: catalogue
}
Expand Down
7 changes: 6 additions & 1 deletion lib/limber/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,17 @@ def each_submission_template
sequencing_request_types.each do |sequencing_request_type|
next if SubmissionTemplate.exists?(name: name_for(cherrypick, sequencing_request_type))

# Hiseq templates are hidden as of Y24-181 so we set them as superceeded by unknown
# This allows us to keep the template in case it needs to be restored but not make it visible
superceded_by_id = sequencing_request_type&.name&.downcase&.include?('hiseq') ? -2 : -1

yield(
{
name: name_for(cherrypick, sequencing_request_type),
submission_class_name: 'LinearSubmission',
submission_parameters: submission_parameters(cherrypick, sequencing_request_type),
product_line_id: product_line_id,
superceded_by_id:,
product_line_id:,
product_catalogue: catalogue
}
)
Expand Down

0 comments on commit a8d8180

Please sign in to comment.