Permalink
Browse files

show project names in ticket list

  • Loading branch information...
1 parent 7aa7e75 commit 55730fdd5cdfed8c85b795e91b959ec646505bce @chrisb committed Nov 16, 2010
Showing with 3 additions and 2 deletions.
  1. +2 −1 public/javascripts/application.js
  2. +1 −1 refuddle.rb
@@ -8,7 +8,6 @@ var formatSummary = function (elCell, oRecord, oColumn, oData) {
}
};
-
var formatStatus = function (elCell, oRecord, oColumn, oData) {
if(oRecord._oData.summary.include('[hold]')) {
elCell.innerHTML = 'hold';
@@ -25,6 +24,7 @@ YAHOO.util.Event.addListener(window, "load", function() {
var myColumnDefsY = [
{ key:"number", width:20, label: "#", sortable: true },
{ key:"status", width:100, label: "Status", formatter: formatStatus, sortable: true },
+ { key:"project_name", width: 140, label: "Project", sortable: true },
{ key:"summary", label: "Summary", formatter: formatSummary, sortable: true }
];
@@ -39,6 +39,7 @@ YAHOO.util.Event.addListener(window, "load", function() {
{ key: 'status' },
{ key: 'summary' },
{ key: 'project_id' },
+ { key: 'project_name' },
{ key: 'id' }
]
};
View
@@ -52,7 +52,7 @@ def unfuddle_base_url
end
get '/tickets.js' do
- { :items => unfuddle_call_api('/ticket_reports/dynamic.json?conditions_string=assignee-eq-current,status-neq-closed,status-neq-resolved')['groups'].first['tickets'] }.to_json
+ { :items => unfuddle_call_api('/ticket_reports/dynamic.json?conditions_string=assignee-eq-current,status-neq-closed,status-neq-resolved')['groups'].first['tickets'].map { |t| t.merge( 'project_name' => session[:projects][t['project_id']] )} }.to_json
end
get '/ticket/:project_id/:number.js' do

0 comments on commit 55730fd

Please sign in to comment.