]> source.dussan.org Git - redmine.git/commitdiff
Hide custom field link values from being shown when value is empty (#21944).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 15 Mar 2016 22:14:39 +0000 (22:14 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 15 Mar 2016 22:14:39 +0000 (22:14 +0000)
Patch by Anders Thomsen.

git-svn-id: http://svn.redmine.org/redmine/trunk@15250 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/field_format.rb

index b2aa679313fc636d30552b6c27b25dda8d9c6d9f..de2f8fc5c9298678e0f113bd78e32523abd21865 100644 (file)
@@ -355,7 +355,7 @@ module Redmine
       self.form_partial = 'custom_fields/formats/link'
 
       def formatted_value(view, custom_field, value, customized=nil, html=false)
-        if html
+        if html && value.present?
           if custom_field.url_pattern.present?
             url = url_from_pattern(custom_field, value, customized)
           else