diff --git a/app/controllers/adsprints_controller.rb b/app/controllers/adsprints_controller.rb index 20a0dec..073edad 100644 --- a/app/controllers/adsprints_controller.rb +++ b/app/controllers/adsprints_controller.rb @@ -11,7 +11,7 @@ def list @project.assignable_users.each{|u| @assignables[u.id] = u.firstname + ' ' + u.lastname} @project_id = @project.id @plugin_path = File.join(Redmine::Utils.relative_url_root, 'plugin_assets', 'AgileDwarf') - @closed_status = Setting.plugin_AgileDwarf[:stclosed].to_i + @closed_status = Setting.plugin_AgileDwarf["stclosed"].to_i end private @@ -20,4 +20,4 @@ def find_project # @project variable must be set before calling the authorize filter @project = Project.find(params[:project_id]) end -end \ No newline at end of file +end diff --git a/app/controllers/adtaskinl_controller.rb b/app/controllers/adtaskinl_controller.rb index bd1dc8a..71b7bfa 100644 --- a/app/controllers/adtaskinl_controller.rb +++ b/app/controllers/adtaskinl_controller.rb @@ -23,7 +23,7 @@ def update def create attribs = params.select{|k,v| k != 'id' and SprintsTasks.column_names.include? k } attribs = Hash[*attribs.flatten] - attribs['tracker_id'] = attribs['tracker_id'] || Setting.plugin_AgileDwarf[:tracker] + attribs['tracker_id'] = attribs['tracker_id'] || Setting.plugin_AgileDwarf['tracker'] attribs['author_id'] = User.current.id task = SprintsTasks.new(attribs) begin @@ -50,7 +50,7 @@ def tooltip end def spent - spenttime = TimeEntry.new({:hours => params[:hours], :activity_id => Setting.plugin_AgileDwarf[:activity], :user => User.current, :project => @project, :spent_on => Date.today, + spenttime = TimeEntry.new({:hours => params[:hours], :activity_id => Setting.plugin_AgileDwarf["activity"], :user => User.current, :project => @project, :spent_on => Date.today, :issue_id => params[:id]}) begin spenttime.save! @@ -97,4 +97,4 @@ def find_project # @project variable must be set before calling the authorize filter @project = Project.find(params[:project_id]) end -end \ No newline at end of file +end diff --git a/app/controllers/adtasks_controller.rb b/app/controllers/adtasks_controller.rb index 3293b11..f95811c 100644 --- a/app/controllers/adtasks_controller.rb +++ b/app/controllers/adtasks_controller.rb @@ -25,11 +25,10 @@ def list user = nil if @user == 'all' @plugin_path = File.join(Redmine::Utils.relative_url_root, 'plugin_assets', 'AgileDwarf') - status_ids = [] - colcount = Setting.plugin_AgileDwarf[:stcolumncount].to_i + colcount = Setting.plugin_AgileDwarf['stcolumncount'].to_i for i in 1 .. colcount - status_ids << Setting.plugin_AgileDwarf[('stcolumn' + i.to_s).to_sym].to_i + status_ids << Setting.plugin_AgileDwarf[('stcolumn' + i.to_s)].to_i end @statuses = {} IssueStatus.find_all_by_id(status_ids).each {|x| @statuses[x.id] = x.name} @@ -45,4 +44,4 @@ def find_project # @project variable must be set before calling the authorize filter @project = Project.find(params[:project_id]) end -end \ No newline at end of file +end diff --git a/app/views/adsprints/_task.html.erb b/app/views/adsprints/_task.html.erb index 955101b..c33662d 100644 --- a/app/views/adsprints/_task.html.erb +++ b/app/views/adsprints/_task.html.erb @@ -1,7 +1,7 @@ -
+
#<%= link_to task.id, :controller => 'issues', :action => 'show', :id => task %>
<%=h task.subject %>
<%=h task.estimated_hours || l(:label_sprints_placeholder_estimated) %>
<%=h task.assigned_to %>
-
\ No newline at end of file +
diff --git a/app/views/adtasks/_task.html.erb b/app/views/adtasks/_task.html.erb index 04bb66e..c35f614 100644 --- a/app/views/adtasks/_task.html.erb +++ b/app/views/adtasks/_task.html.erb @@ -1,4 +1,4 @@ -
+
#<%= link_to task.id, :controller => 'issues', :action => 'show', :id => task %>
<%=h task.subject %>
@@ -21,4 +21,4 @@
h
<%=h task.spent || '0' %>
-
\ No newline at end of file + diff --git a/app/views/shared/_settings.html.erb b/app/views/shared/_settings.html.erb index c441f10..554e876 100644 --- a/app/views/shared/_settings.html.erb +++ b/app/views/shared/_settings.html.erb @@ -3,47 +3,47 @@

<%= content_tag(:label, l(:label_settings_tracker)) %> - <%= select_tag("settings[tracker]", options_from_collection_for_select(Tracker.all, :id, :name, Setting.plugin_AgileDwarf[:tracker].to_i)) %> + <%= select_tag("settings[tracker]", options_from_collection_for_select(Tracker.all, :id, :name, Setting.plugin_AgileDwarf['tracker'].to_i)) %>

<%= content_tag(:label, l(:label_settings_activity)) %> - <%= select_tag("settings[activity]", options_from_collection_for_select(TimeEntryActivity.all, :id, :name, Setting.plugin_AgileDwarf[:activity].to_i)) %> + <%= select_tag("settings[activity]", options_from_collection_for_select(TimeEntryActivity.all, :id, :name, Setting.plugin_AgileDwarf['activity'].to_i)) %>

<%= content_tag(:label, l(:label_settings_closedstatus)) %> - <%= select_tag("settings[stclosed]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf[:stclosed].to_i)) %> + <%= select_tag("settings[stclosed]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf['stclosed'].to_i)) %>

<%= content_tag(:label, l(:label_settings_columncount)) %> - <%= select_tag("settings[stcolumncount]", options_for_select([2, 3, 4, 5], Setting.plugin_AgileDwarf[:stcolumncount].to_i)) %> + <%= select_tag("settings[stcolumncount]", options_for_select([2, 3, 4, 5], Setting.plugin_AgileDwarf['stcolumncount'].to_i)) %>

<%= content_tag(:label, l(:label_settings_column1status)) %> - <%= select_tag("settings[stcolumn1]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf[:stcolumn1].to_i)) %> + <%= select_tag("settings[stcolumn1]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf['stcolumn1'].to_i)) %>

<%= content_tag(:label, l(:label_settings_column2status)) %> - <%= select_tag("settings[stcolumn2]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf[:stcolumn2].to_i)) %> + <%= select_tag("settings[stcolumn2]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf['stcolumn2'].to_i)) %>

<%= content_tag(:label, l(:label_settings_column3status)) %> - <%= select_tag("settings[stcolumn3]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf[:stcolumn3].to_i)) %> + <%= select_tag("settings[stcolumn3]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf['stcolumn3'].to_i)) %>

<%= content_tag(:label, l(:label_settings_column4status)) %> - <%= select_tag("settings[stcolumn4]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf[:stcolumn4].to_i)) %> + <%= select_tag("settings[stcolumn4]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf['stcolumn4'].to_i)) %>

<%= content_tag(:label, l(:label_settings_column5status)) %> - <%= select_tag("settings[stcolumn5]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf[:stcolumn5].to_i)) %> + <%= select_tag("settings[stcolumn5]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf['stcolumn5'].to_i)) %>

-
\ No newline at end of file + diff --git a/assets/javascripts/burndown.js b/assets/javascripts/burndown.js index 9d03f1f..c451987 100644 --- a/assets/javascripts/burndown.js +++ b/assets/javascripts/burndown.js @@ -66,7 +66,8 @@ var Burndown = function ($) else { // rest of work = ((100 - done_ratio) * estimate) / 100 - sum += ((100 - task.done_ratio) * (task.estimated_hours || 0)) / 100; + console.log(task.sprints_tasks.done_ratio); + sum += ((100 - task.sprints_tasks.done_ratio) * (task.sprints_tasks.estimated_hours || 0)) / 100; } } // add new point to series @@ -209,4 +210,4 @@ var Burndown = function ($) }); return obj; -}(jQuery); \ No newline at end of file +}(jQuery); diff --git a/assets/javascripts/libs/jquery.jeditable.ptext.js b/assets/javascripts/libs/jquery.jeditable.ptext.js index 2715e77..5e262fc 100644 --- a/assets/javascripts/libs/jquery.jeditable.ptext.js +++ b/assets/javascripts/libs/jquery.jeditable.ptext.js @@ -1,13 +1,13 @@ $.editable.addInputType('ptext', { element : function(settings, original) { - var input = $(''); + var input = $(document.createElement('input')); + input.attr('type','text'); if (settings.width != 'none') { input.attr('width', settings.width); } if (settings.height != 'none') { input.attr('height', settings.height); } input.attr('autocomplete','off'); input.attr('placeholder', settings.placeholder); $(this).append(input); - input.textPlaceholder(); return input; } }); diff --git a/assets/stylesheets/sprints.css b/assets/stylesheets/sprints.css index e4cb91d..ff5287f 100644 --- a/assets/stylesheets/sprints.css +++ b/assets/stylesheets/sprints.css @@ -80,6 +80,23 @@ -webkit-box-shadow: 0 0 4px #1f6993; } + +.task_list .sc_task_hide +{ + display:None; +} + +.task_list .sc_task.sc_task_tracker_UserStorie +{ + border-color: #276DFA; + background: rgba(39, 109, 250, 0.3); + box-shadow: 0 0 4px #276DFA; + -moz-box-shadow: 0 0 4px #276DFA; + -ms-box-shadow: 0 0 4px #276DFA; + -o-box-shadow: 0 0 4px #276DFA; + -webkit-box-shadow: 0 0 4px #276DFA; +} + .task_list { margin: 0; @@ -210,4 +227,4 @@ .time_list { margin-right: 5px; -} \ No newline at end of file +}