From 67721f83513cb1550a809ff82c6cf87c4bafabb3 Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Thu, 8 Oct 2020 17:08:17 +0200 Subject: [PATCH] TMSS-190: changes names for test data --- SAS/TMSS/src/tmss/tmssapp/populate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SAS/TMSS/src/tmss/tmssapp/populate.py b/SAS/TMSS/src/tmss/tmssapp/populate.py index d3c26765ffa..00a1018c32c 100644 --- a/SAS/TMSS/src/tmss/tmssapp/populate.py +++ b/SAS/TMSS/src/tmss/tmssapp/populate.py @@ -56,8 +56,8 @@ def populate_test_data(): from lofar.sas.tmss.tmss.tmssapp.tasks import create_task_blueprints_and_subtasks_from_scheduling_unit_draft, create_task_blueprints_and_subtasks_and_schedule_subtasks_from_scheduling_unit_draft from lofar.sas.tmss.tmss.tmssapp.subtasks import schedule_subtask - tmss_projects = models.Project.objects.filter(name__startswith="TMSS-Commissioning").all() - for tmss_project in tmss_projects: + tmss_projects = models.Project.objects.filter(name__startswith="TMSS-Commissioning").order_by('priority_rank').all() + for project_nr, tmss_project in enumerate(tmss_projects): for set_nr in range(1): # create a Test Scheduling Set UC1 under project TMSS-Commissioning project_prio_name = tmss_project.name.replace("TMSS-Commissioning ", "") @@ -76,7 +76,7 @@ def populate_test_data(): scheduling_unit_spec = add_defaults_to_json_object_for_schema(strategy_template.template, strategy_template.scheduling_unit_template.schema) # add the scheduling_unit_doc to a new SchedulingUnitDraft instance, and were ready to use it! - scheduling_unit_draft = models.SchedulingUnitDraft.objects.create(name="UC1 test scheduling unit %s.%s (%s)" % (set_nr+1, unit_nr+1, project_prio_name), + scheduling_unit_draft = models.SchedulingUnitDraft.objects.create(name="UC1 unit p%s.s%s.u%s (%s)" % (project_nr+1, set_nr+1, unit_nr+1, project_prio_name), scheduling_set=scheduling_set, requirements_template=strategy_template.scheduling_unit_template, requirements_doc=scheduling_unit_spec, -- GitLab