diff --git a/src/components/SubmissionRefsAddModal.js b/src/components/SubmissionRefsAddModal.js
index 48bd4ac6..a07a145b 100644
--- a/src/components/SubmissionRefsAddModal.js
+++ b/src/components/SubmissionRefsAddModal.js
@@ -253,7 +253,7 @@ const SubmissionRefsAddModal = (props) => {
/>
(if any)')} labelKey='name'
+ label={`Parent ${key}` + (props.modalMode === 'Task' ? '' : '
(if any)')} labelKey='name'
options={props.allNames}
onSelect={handleOnSelectParent}
onChange={handleOnChangeParent}
diff --git a/src/views/Submission.js b/src/views/Submission.js
index ff4eb56a..a39236a6 100644
--- a/src/views/Submission.js
+++ b/src/views/Submission.js
@@ -120,6 +120,7 @@ class Submission extends React.Component {
this.handleOnChange = this.handleOnChange.bind(this)
this.handleSortNames = this.handleSortNames.bind(this)
this.handleTrimTasks = this.handleTrimTasks.bind(this)
+ this.handleTrimParentTasks = this.handleTrimParentTasks.bind(this)
this.handleTrimMethods = this.handleTrimMethods.bind(this)
this.handleTrimPlatforms = this.handleTrimPlatforms.bind(this)
this.handleTrimTags = this.handleTrimTags.bind(this)
@@ -398,6 +399,7 @@ class Submission extends React.Component {
}
handleTrimTasks (submission, tasks) {
+ this.handleTrimParentTasks(tasks)
for (let i = 0; i < submission.tasks.length; i++) {
for (let j = 0; j < tasks.length; j++) {
if (submission.tasks[i].id === tasks[j].id) {
@@ -408,6 +410,15 @@ class Submission extends React.Component {
}
}
+ handleTrimParentTasks (tasks) {
+ for (let j = 0; j < tasks.length; j++) {
+ if (tasks[j].top) {
+ tasks.splice(j, 1)
+ --j
+ }
+ }
+ }
+
handleTrimMethods (submission, methods) {
for (let i = 0; i < submission.methods.length; i++) {
for (let j = 0; j < methods.length; j++) {