From 254995675535b9a7c1af2f5f64a9a78e4fef39aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Thu, 7 Feb 2019 10:52:19 +0100 Subject: [PATCH] Fix updating with no previous linked work package [ci skip] --- modules/bim/app/assets/stylesheets/bim/bim.sass | 5 +++++ modules/bim/app/models/bim/bcf_issue.rb | 4 +++- .../bim/app/views/bim/linked_issues/index.html.erb | 1 - .../bim/linked_issues/prepare_import.html.erb | 14 +++++++------- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/modules/bim/app/assets/stylesheets/bim/bim.sass b/modules/bim/app/assets/stylesheets/bim/bim.sass index 24c20ba2f7..9a35b190fa 100644 --- a/modules/bim/app/assets/stylesheets/bim/bim.sass +++ b/modules/bim/app/assets/stylesheets/bim/bim.sass @@ -13,3 +13,8 @@ .bcf--import-listing margin-bottom: 50px + +table.attributes-table + td,th + padding: 5px + text-align: center diff --git a/modules/bim/app/models/bim/bcf_issue.rb b/modules/bim/app/models/bim/bcf_issue.rb index 7e4efe1a51..1a824e0890 100644 --- a/modules/bim/app/models/bim/bcf_issue.rb +++ b/modules/bim/app/models/bim/bcf_issue.rb @@ -15,7 +15,9 @@ module Bim extract_xml('/Markup/Topic/Title/text()', 'title'), extract_xml('/Markup/Topic/Description/text()', 'description'), extract_xml('/Markup/Topic/Priority/text()', 'priority_text'), - extract_xml('/Markup/Topic/@TopicStatus', 'status_text') + extract_xml('/Markup/Topic/@TopicStatus', 'status_text'), + extract_xml('/Markup/Topic/AssignedTo/text()', 'assignee_text'), + extract_xml('/Markup/Topic/DueDate/text()', 'due_date_text') end private diff --git a/modules/bim/app/views/bim/linked_issues/index.html.erb b/modules/bim/app/views/bim/linked_issues/index.html.erb index 1bdd849911..b235a17b44 100644 --- a/modules/bim/app/views/bim/linked_issues/index.html.erb +++ b/modules/bim/app/views/bim/linked_issues/index.html.erb @@ -35,7 +35,6 @@

<%= issue.title %>
- <%= issue.description %> <% if issue.work_package %> <%= link_to_work_package(issue.work_package) %>
diff --git a/modules/bim/app/views/bim/linked_issues/prepare_import.html.erb b/modules/bim/app/views/bim/linked_issues/prepare_import.html.erb index bb24c73eb3..3211642db4 100644 --- a/modules/bim/app/views/bim/linked_issues/prepare_import.html.erb +++ b/modules/bim/app/views/bim/linked_issues/prepare_import.html.erb @@ -23,20 +23,20 @@ - <% if issue %> + <% if issue && issue.work_package %> <%= link_to_work_package issue.work_package %> <% else %> (will be created) <% end %> - <%= entry[:title] %> - <%= entry[:status] %> - <%= entry[:priority] %> - <%= entry[:assignee] %> - <%= format_date(entry[:due_date]) %> + <%= entry[:title] || '-' %> + <%= entry[:status] || '-' %> + <%= entry[:priority] || '-' %> + <%= entry[:assignee] || '-' %> + <%= format_date(entry[:due_date]) || '-' %> <%= entry[:viewpoint_count] %> <%= entry[:comments_count] %> - <% if issue %> + <% if issue&.work_package %> <%= issue.work_package.subject %> <%= issue.work_package.status.name %>