Project

General

Profile

Defect #1504

Move pbi js, issue in source code

Added by Redmine Smile about 7 years ago.

Status:
New
Priority:
Normal
Category:
Sprint board
Target version:
-
Source:
Customer
Detected on version:
Blocked:
No
Alone:
No
Milestones:
Sprint:

Description

As you can see in app/views/scrum/move_pbi.js.erb, @position value different from top are not accessible because of first elsif :

<%- if defined?(@exception) -%>
  <%- message = l(:error_updating_pbi, :message => @exception.message)
      message_class = 'error' -%>
  $("#popup-messages").html("<div class=\"flash <%= message_class %>\"><%= message %></div>");
<%- elsif @position == 'top' -%>
  $("#popup-messages").html("");
  <%- if @position == 'top' -%>
    $("#<%= "pbi_#{@pbi.id}" %>").parent().prepend($("#<%= "pbi_#{@pbi.id}" %>"));
  <%- elsif @position == 'bottom' -%>
    $("#<%= "pbi_#{@pbi.id}" %>").parent().append($("#<%= "pbi_#{@pbi.id}" %>"));
  <%- elsif @position == 'before' -%>
    $("#ajax-modal").dialog("close");
    $("#<%= "pbi_#{@other_pbi}" %>").before($("#<%= "pbi_#{@pbi.id}" %>"));
  <%- elsif @position == 'after' -%>
    $("#ajax-modal").dialog("close");
    $("#<%= "pbi_#{@other_pbi}" %>").after($("#<%= "pbi_#{@pbi.id}" %>"));
  <%- else -%>
    console.log("Invalid position: <%= @position.inspect %>");
  <%- end -%>
<%- end -%>

No data to display

Also available in: Atom PDF