]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Layout/ElseAlignment in lib/redmine/export/pdf/issues_pdf_...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 17 Oct 2019 11:22:30 +0000 (11:22 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 17 Oct 2019 11:22:30 +0000 (11:22 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18705 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
lib/redmine/export/pdf/issues_pdf_helper.rb

index 1c0f26bffc67d7df14610611052b562d5ffd293a..eb7b00850cf4ffecb6b3101a833bf4ee5d95f654 100644 (file)
@@ -108,7 +108,6 @@ Layout/ElseAlignment:
     - 'app/helpers/attachments_helper.rb'
     - 'app/helpers/queries_helper.rb'
     - 'app/models/issue_query.rb'
-    - 'lib/redmine/export/pdf/issues_pdf_helper.rb'
 
 # Cop supports --auto-correct.
 Layout/EmptyLineAfterGuardClause:
index 6f86e1d5587d69b3a0f5e5d5945b46f095af8024..8b1e59ae2fa5260176adede7f6c6ec53f4e08d9b 100644 (file)
@@ -369,27 +369,28 @@ module Redmine
         # fetch row values
         def fetch_row_values(issue, query, level)
           query.inline_columns.collect do |column|
-            s = if column.is_a?(QueryCustomFieldColumn)
-              cv = issue.visible_custom_field_values.detect {|v| v.custom_field_id == column.custom_field.id}
-              show_value(cv, false)
-            else
-              value = issue.send(column.name)
-              case column.name
-              when :subject
-                value = "  " * level + value
-              when :attachments
-                value = value.to_a.map {|a| a.filename}.join("\n")
-              end
-              if value.is_a?(Date)
-                format_date(value)
-              elsif value.is_a?(Time)
-                format_time(value)
-              elsif value.is_a?(Float)
-                sprintf "%.2f", value
+            s =
+              if column.is_a?(QueryCustomFieldColumn)
+                cv = issue.visible_custom_field_values.detect {|v| v.custom_field_id == column.custom_field.id}
+                show_value(cv, false)
               else
-                value
+                value = issue.send(column.name)
+                case column.name
+                when :subject
+                  value = "  " * level + value
+                when :attachments
+                  value = value.to_a.map {|a| a.filename}.join("\n")
+                end
+                if value.is_a?(Date)
+                  format_date(value)
+                elsif value.is_a?(Time)
+                  format_time(value)
+                elsif value.is_a?(Float)
+                  sprintf "%.2f", value
+                else
+                  value
+                end
               end
-            end
             s.to_s
           end
         end