From 569be8a76b3cdff9dc479ef9058cb13d6b085e46 Mon Sep 17 00:00:00 2001 From: Gregory Buchanan Date: Thu, 24 Oct 2024 10:05:52 -0700 Subject: [PATCH] Add job name prefix just before job submit. (#3887) * Check for path in job name before finalizing it. * Only add prefix to auto_job_name just before submit. --- .../app/lib/smart_attributes/attributes/auto_job_name.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/app/lib/smart_attributes/attributes/auto_job_name.rb b/apps/dashboard/app/lib/smart_attributes/attributes/auto_job_name.rb index 0761ec7a18..5fd0f17a19 100644 --- a/apps/dashboard/app/lib/smart_attributes/attributes/auto_job_name.rb +++ b/apps/dashboard/app/lib/smart_attributes/attributes/auto_job_name.rb @@ -17,7 +17,7 @@ class AutoJobName < Attribute # Defaults to ondemand/[dev,sys]/projects # @return [String] attribute value def value - job_name(opts[:value] || 'Project Manager Job') + opts[:value] || 'Project Manager Job' end def widget @@ -32,7 +32,7 @@ def label(*) # @param fmt [String, nil] formatting of hash # @return [Hash] submission hash def submit(*) - { script: { job_name: value } } + { script: { job_name: job_name(value) } } end # TODO: need to sanitize the job name for some schedulers