Skip to content

Commit

Permalink
Merge pull request #79 from dipanm/master
Browse files Browse the repository at this point in the history
Fix for #78 -- incorrect count of release notes with no custom value
  • Loading branch information
Harry Garrood committed May 7, 2013
2 parents 0abf3d8 + aa2b8f5 commit d57afcf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/redmine_release_notes/issue_patch.rb
Expand Up @@ -58,8 +58,9 @@ def self.release_notes_custom_value_nil
conditions_a << " AND customized_id = issues.id"
conditions_a << ")"

conditions_b = "(custom_values.value IS NULL"
conditions_b = "( (custom_values.value IS NULL"
conditions_b << " OR custom_values.value = '')"
conditions_b << " AND (custom_values.custom_field_id = #{cf_id}) )"

includes(:custom_values).where("#{conditions_a} OR #{conditions_b}")
end
Expand Down

0 comments on commit d57afcf

Please sign in to comment.