From 3238bd4e374e2cdd81f547cea256a84ed19c0464 Mon Sep 17 00:00:00 2001 From: nobelium Date: Fri, 2 Aug 2013 05:35:31 +0530 Subject: [PATCH 1/2] added links to kanbantaskboard ticket n removed draggable property for taskboard ticket --- controllers/taskboard.rb | 6 +++++- views/macros/simple_task_board.haml | 18 +++--------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/controllers/taskboard.rb b/controllers/taskboard.rb index 6ca0db4..b17fcd4 100644 --- a/controllers/taskboard.rb +++ b/controllers/taskboard.rb @@ -24,7 +24,11 @@ def show(params) @spec[:project_id] = project[:id] @model = Dirt::Taskboard.new(@spec) @model.cards - haml :taskboard + text = haml :taskboard + + text.gsub(/#([0-9]+)/) do |m| + %Q{##{$1}} + end end end end diff --git a/views/macros/simple_task_board.haml b/views/macros/simple_task_board.haml index 8cff9d9..e293768 100644 --- a/views/macros/simple_task_board.haml +++ b/views/macros/simple_task_board.haml @@ -12,7 +12,7 @@ - lanes.each do |lane| %td{data:{bind: "boxext :{ name :'box'}"}} - stream_cards(:stream => stream, :lane => lane).each do |card| - .card-border{draggable: "true", ticketId: "#{card[:id]}", data: {target: "#comment_modal", toggle: "modal", bind: "click : handleClick , cardext :{ name :'#{card[:id]}'}"}} + .card-border{ticketId: "#{card[:id]}"} .card{class: card[:age_class]} %p="##{card[:id]}" %p=card[:Owner] @@ -24,22 +24,10 @@ - lanes.each do |lane| %td{data:{bind: "boxext :{ name :'box'}"}} - misc_cards(:lane => lane).each do |card| - .card-border{draggable: "true", ticketId: "#{card[:id]}", data: {target: "#comment_modal", toggle: "modal", bind: "click : handleClick , cardext :{ name :'#{card[:id]}'}"}} + .card-border{ticketId: "#{card[:id]}"} .card{class: card[:age_class]} %p="##{card[:id]}" %p=card[:Owner] -# %p=card[:LastUpdated] %p - %span.card-subject(title="#{card[:Subject]}")=card[:short_subject] - -#comment_modal.modal.hide.fade - .modal-header - %button.close{type: "button", data:{dismiss: "modal"}} x - %h3 Some heading - .modal-body - %p Some thing about the ticket - %p comments - .modal-footer - %button.btn.btn-primary{data: {dismiss: "modal"}} Close - - \ No newline at end of file + %span.card-subject(title="#{card[:Subject]}")=card[:short_subject] From 48736081d870b96dc511f1687c8d829db14ece85 Mon Sep 17 00:00:00 2001 From: nobelium Date: Fri, 2 Aug 2013 06:03:27 +0530 Subject: [PATCH 2/2] 302 error fix --- lib/request-tracker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/request-tracker.rb b/lib/request-tracker.rb index ae8345f..98e147f 100644 --- a/lib/request-tracker.rb +++ b/lib/request-tracker.rb @@ -39,7 +39,7 @@ def authenticate(params) return response['set-cookie'].split('; ')[0] elsif response.body.split('\n').first =~ /401 Credentials required/ then raise "Your username or password is incorrect" - elsif response.body.split('\n').first =~ /401 Credentials required/ then + elsif response.body.split('\n').first =~ /302/ then raise "Your have insufficient RT privileges" else raise "Got #{response.code} #{response.message} when trying to #{@base_url} body='#{response.body}'"