diff --git a/backend/src/main/kotlin/dev/dres/DRES.kt b/backend/src/main/kotlin/dev/dres/DRES.kt
index e488bfb8..6cbfa0f5 100644
--- a/backend/src/main/kotlin/dev/dres/DRES.kt
+++ b/backend/src/main/kotlin/dev/dres/DRES.kt
@@ -42,7 +42,7 @@ import kotlin.system.exitProcess
*/
object DRES {
/** Version of DRES. */
- const val VERSION = "2.0.4"
+ const val VERSION = "2.0.3"
/** Application root; should be relative to JAR file or classes path. */
val APPLICATION_ROOT: Path =
diff --git a/doc/oas-client.json b/doc/oas-client.json
index f62c5622..80dfdbe2 100644
--- a/doc/oas-client.json
+++ b/doc/oas-client.json
@@ -2,8 +2,8 @@
"openapi" : "3.0.3",
"info" : {
"title" : "DRES Client API",
- "version" : "2.0.4",
- "description" : "Client API for DRES (Distributed Retrieval Evaluation Server), Version 2.0.4"
+ "version" : "2.0.3",
+ "description" : "Client API for DRES (Distributed Retrieval Evaluation Server), Version 2.0.3"
},
"paths" : {
"/api/v2/client/evaluation/currentTask/{evaluationId}" : {
diff --git a/doc/oas.json b/doc/oas.json
index f35b8b4a..c7394462 100644
--- a/doc/oas.json
+++ b/doc/oas.json
@@ -2,8 +2,8 @@
"openapi" : "3.0.3",
"info" : {
"title" : "DRES API",
- "version" : "2.0.4",
- "description" : "API for DRES (Distributed Retrieval Evaluation Server), Version 2.0.4",
+ "version" : "2.0.3",
+ "description" : "API for DRES (Distributed Retrieval Evaluation Server), Version 2.0.3",
"contact" : {
"name" : "The DRES Dev Team",
"url" : "https://dres.dev"
diff --git a/frontend/src/app/competition/competition-builder/competition-builder-task-dialog/competition-form.builder.ts b/frontend/src/app/competition/competition-builder/competition-builder-task-dialog/competition-form.builder.ts
index 795ace5a..9a1c49ba 100644
--- a/frontend/src/app/competition/competition-builder/competition-builder-task-dialog/competition-form.builder.ts
+++ b/frontend/src/app/competition/competition-builder/competition-builder-task-dialog/competition-form.builder.ts
@@ -124,18 +124,19 @@ export class CompetitionFormBuilder {
/**
* Adds a new {@link FormGroup} for the given {@link TaskType.ComponentsEnum}.
*
- * @param type The {@link TaskType.TargetTypeEnum} to add a {@link FormGroup} for.
+ * @param type The {@link ApiTargetOption} to add a {@link FormGroup} for.
+ * @param initialise The {@link ApiTarget} to add
*/
- public addTargetForm(type: ApiTargetOption) {
+ public addTargetForm(type: ApiTargetOption, initialise?: ApiTarget) {
const array = this.form.get('target') as UntypedFormArray;
const newIndex = array.length;
switch (type) {
case "SINGLE_MEDIA_ITEM":
- const f = this.singleMediaItemTargetForm(newIndex);
+ const f = this.singleMediaItemTargetForm(newIndex, initialise);
array.push(f)
return f;
case "SINGLE_MEDIA_SEGMENT":
- const targetForm = this.singleMediaSegmentTargetForm(newIndex);
+ const targetForm = this.singleMediaSegmentTargetForm(newIndex, initialise);
array.push(targetForm);
return targetForm;
case "JUDGEMENT":
@@ -143,7 +144,7 @@ export class CompetitionFormBuilder {
console.warn("Judgement and Vote shouldn't have access to add targets. This is a programmer's error.")
break;
case 'TEXT':
- const form = this.singleTextTargetForm();
+ const form = this.singleTextTargetForm(initialise);
array.push(form);
return form;
default:
@@ -372,8 +373,9 @@ export class CompetitionFormBuilder {
)
);
+
/* Load media item from API. */
- if (initialize?.target && this.data?.collectionId) {
+ if (initialize?.target && this.form.get('mediaCollection')) {
this.collectionService
.getApiV2MediaItemByMediaItemId(initialize?.target)
.pipe(first())
@@ -407,7 +409,7 @@ export class CompetitionFormBuilder {
);
/* Load media item from API. */
- if (initialize?.target && this.data.collectionId) {
+ if (initialize?.target && this.form.get('mediaCollection')) {
this.collectionService
.getApiV2MediaItemByMediaItemId(initialize.target)
.pipe(first())
diff --git a/frontend/src/app/template/template-builder/components/batch-add-target-dialog/batch-add-target-dialog.component.html b/frontend/src/app/template/template-builder/components/batch-add-target-dialog/batch-add-target-dialog.component.html
new file mode 100644
index 00000000..e23f0c5e
--- /dev/null
+++ b/frontend/src/app/template/template-builder/components/batch-add-target-dialog/batch-add-target-dialog.component.html
@@ -0,0 +1,21 @@
+
Batch Add Targets
+
+
+ Batch-add targets by file or by your input, each on its own line.
+ Please not that the target name must be exactly matching the media item's name.
+