lib/journal_patch.rb
# Returns journal details that are visible to user
Returns journal details that are visible to user
Returns journal details that are visible to user
def visible_details_with_patch(user=User.current)
      details.select do |detail|
        if detail.property == 'cf'
          detail.custom_field && detail.custom_field.visible_by?(project, user)
        elsif detail.property == 'relation'
          Issue.find_by_id(detail.value || detail.old_value).try(:visible?, user)
        elsif detail.property == 'attr' && detail.prop_key == 'estimated_hours' && !user.allowed_to?(:view_time_entries, project)
          false
        else
          true
        end
      end
    end
def visible_details_with_patch ( user = User . current ) details . select do | detail | if detail . property == 'cf' detail . custom_field && detail . custom_field . visible_by? ( project , user ) elsif detail . property == 'relation' Issue . find_by_id ( detail . value || detail . old_value ) . try ( :visible? , user ) elsif detail . property == 'attr' && detail . prop_key == 'estimated_hours' && ! user . allowed_to? ( :view_time_entries , project ) false else true end end end
Returns journal details that are visible to user
Returns journal details that are visible to user
# removing estimated time in this elsif
user
<not_specific>
current
<not_specific>