doortts doortts 2017-03-23
issue: Prevent displaying duplicates when selecting parent issues
@a8ac4ca0547c6d6beeb5d190ff520c87f8e38fb1
app/views/issue/partial_select_subtask.scala.html
--- app/views/issue/partial_select_subtask.scala.html
+++ app/views/issue/partial_select_subtask.scala.html
@@ -30,8 +30,8 @@
                 }
             }
             @for(issue <- Issue.findByProject(project, "", 1).filter(issue => issue.id != currentIssueId)) {
-                @if(issue.parent == null && !hasChildIssue) {
-                    <option value="@issue.id" @if(issue.id == parentIssueId) {selected}>#@issue.getNumber. @issue.title </option>
+                @if(issue.parent == null && !hasChildIssue && issue.id != parentIssueId) {
+                    <option value="@issue.id">#@issue.getNumber. @issue.title </option>
                 }
             }
         </select>
Add a comment
List