2011-05-30 00:11:52 +04:00
|
|
|
#-- copyright
|
|
|
|
# ChiliProject is a project management system.
|
2011-05-30 22:52:25 +04:00
|
|
|
#
|
2011-05-30 00:11:52 +04:00
|
|
|
# Copyright (C) 2010-2011 the ChiliProject Team
|
2011-05-30 22:52:25 +04:00
|
|
|
#
|
2011-05-30 00:11:52 +04:00
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
2011-05-30 22:52:25 +04:00
|
|
|
#
|
2011-05-30 00:11:52 +04:00
|
|
|
# See doc/COPYRIGHT.rdoc for more details.
|
|
|
|
#++
|
|
|
|
|
2007-03-12 20:59:02 +03:00
|
|
|
class IssuesController < ApplicationController
|
2010-04-30 14:48:19 +04:00
|
|
|
menu_item :new_issue, :only => [:new, :create]
|
2009-10-21 21:07:18 +04:00
|
|
|
default_search_scope :issues
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2010-08-16 20:25:04 +04:00
|
|
|
before_filter :find_issue, :only => [:show, :edit, :update]
|
2010-08-24 19:27:12 +04:00
|
|
|
before_filter :find_issues, :only => [:bulk_edit, :bulk_update, :move, :perform_move, :destroy]
|
2010-10-08 07:09:51 +04:00
|
|
|
before_filter :check_project_uniqueness, :only => [:move, :perform_move]
|
2010-08-20 19:22:19 +04:00
|
|
|
before_filter :find_project, :only => [:new, :create]
|
2010-08-23 19:04:36 +04:00
|
|
|
before_filter :authorize, :except => [:index]
|
|
|
|
before_filter :find_optional_project, :only => [:index]
|
2010-04-26 19:08:06 +04:00
|
|
|
before_filter :check_for_default_issue_status, :only => [:new, :create]
|
2010-04-23 19:05:13 +04:00
|
|
|
before_filter :build_new_issue_from_params, :only => [:new, :create]
|
2010-11-05 20:49:25 +03:00
|
|
|
accept_key_auth :index, :show, :create, :update, :destroy
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2009-11-28 13:29:48 +03:00
|
|
|
rescue_from Query::StatementInvalid, :with => :query_statement_invalid
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2008-02-02 13:50:31 +03:00
|
|
|
helper :journals
|
2010-07-29 16:48:24 +04:00
|
|
|
include JournalsHelper
|
2007-06-13 03:07:00 +04:00
|
|
|
helper :projects
|
2011-05-30 22:52:25 +04:00
|
|
|
include ProjectsHelper
|
2007-03-12 20:59:02 +03:00
|
|
|
include CustomFieldsHelper
|
2007-05-05 17:22:27 +04:00
|
|
|
include IssueRelationsHelper
|
2007-05-13 23:43:35 +04:00
|
|
|
include WatchersHelper
|
2007-08-31 21:02:44 +04:00
|
|
|
include AttachmentsHelper
|
2010-01-18 21:00:27 +03:00
|
|
|
include QueriesHelper
|
2011-01-08 03:19:51 +03:00
|
|
|
include RepositoriesHelper
|
2007-08-31 21:02:44 +04:00
|
|
|
include SortHelper
|
2007-11-05 21:38:42 +03:00
|
|
|
include IssuesHelper
|
2009-01-04 15:03:39 +03:00
|
|
|
include Redmine::Export::PDF
|
2006-09-09 20:07:02 +04:00
|
|
|
|
2010-01-13 22:29:19 +03:00
|
|
|
verify :method => [:post, :delete],
|
2009-10-25 16:38:48 +03:00
|
|
|
:only => :destroy,
|
|
|
|
:render => { :nothing => true, :status => :method_not_allowed }
|
2010-03-01 21:29:18 +03:00
|
|
|
|
2010-04-22 19:43:57 +04:00
|
|
|
verify :method => :post, :only => :create, :render => {:nothing => true, :status => :method_not_allowed }
|
2010-08-24 19:27:12 +04:00
|
|
|
verify :method => :post, :only => :bulk_update, :render => {:nothing => true, :status => :method_not_allowed }
|
2010-03-01 21:29:18 +03:00
|
|
|
verify :method => :put, :only => :update, :render => {:nothing => true, :status => :method_not_allowed }
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2007-08-31 21:02:44 +04:00
|
|
|
def index
|
|
|
|
retrieve_query
|
2009-03-12 21:06:54 +03:00
|
|
|
sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria)
|
2010-03-19 18:42:03 +03:00
|
|
|
sort_update(@query.sortable_columns)
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2007-08-31 21:02:44 +04:00
|
|
|
if @query.valid?
|
2010-12-11 16:13:49 +03:00
|
|
|
case params[:format]
|
2010-02-04 22:58:42 +03:00
|
|
|
when 'csv', 'pdf'
|
2010-12-11 16:13:49 +03:00
|
|
|
@limit = Setting.issues_export_limit.to_i
|
2010-02-04 22:58:42 +03:00
|
|
|
when 'atom'
|
2010-12-11 16:13:49 +03:00
|
|
|
@limit = Setting.feeds_limit.to_i
|
|
|
|
when 'xml', 'json'
|
|
|
|
@offset, @limit = api_offset_and_limit
|
2010-02-04 22:58:42 +03:00
|
|
|
else
|
2010-12-11 16:13:49 +03:00
|
|
|
@limit = per_page_option
|
2008-03-05 11:25:22 +03:00
|
|
|
end
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2009-11-28 13:08:29 +03:00
|
|
|
@issue_count = @query.issue_count
|
2010-12-11 16:13:49 +03:00
|
|
|
@issue_pages = Paginator.new self, @issue_count, @limit, params['page']
|
|
|
|
@offset ||= @issue_pages.current.offset
|
2009-11-28 13:08:29 +03:00
|
|
|
@issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version],
|
2011-05-30 22:52:25 +04:00
|
|
|
:order => sort_clause,
|
|
|
|
:offset => @offset,
|
2010-12-11 16:13:49 +03:00
|
|
|
:limit => @limit)
|
2009-11-28 13:08:29 +03:00
|
|
|
@issue_count_by_group = @query.issue_count_by_group
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2007-11-05 21:38:42 +03:00
|
|
|
respond_to do |format|
|
2009-11-28 13:08:29 +03:00
|
|
|
format.html { render :template => 'issues/index.rhtml', :layout => !request.xhr? }
|
2010-12-04 20:43:39 +03:00
|
|
|
format.api
|
2008-07-06 17:47:59 +04:00
|
|
|
format.atom { render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") }
|
2009-11-04 16:22:26 +03:00
|
|
|
format.csv { send_data(issues_to_csv(@issues, @project), :type => 'text/csv; header=present', :filename => 'export.csv') }
|
2009-04-26 17:09:14 +04:00
|
|
|
format.pdf { send_data(issues_to_pdf(@issues, @project, @query), :type => 'application/pdf', :filename => 'export.pdf') }
|
2007-11-05 21:38:42 +03:00
|
|
|
end
|
|
|
|
else
|
|
|
|
# Send html if the query is not valid
|
|
|
|
render(:template => 'issues/index.rhtml', :layout => !request.xhr?)
|
2007-08-31 21:02:44 +04:00
|
|
|
end
|
2008-03-30 16:29:07 +04:00
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
|
|
render_404
|
2007-11-05 21:38:42 +03:00
|
|
|
end
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2006-09-09 20:07:02 +04:00
|
|
|
def show
|
2010-07-14 21:00:03 +04:00
|
|
|
@journals = @issue.journals.find(:all, :include => [:user], :order => "#{Journal.table_name}.created_at ASC")
|
2008-03-05 18:41:54 +03:00
|
|
|
@journals.reverse! if User.current.wants_comments_in_reverse_order?
|
2010-01-31 19:25:06 +03:00
|
|
|
@changesets = @issue.changesets.visible.all
|
2009-02-22 18:16:18 +03:00
|
|
|
@changesets.reverse! if User.current.wants_comments_in_reverse_order?
|
2011-01-22 16:28:20 +03:00
|
|
|
@relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
|
2008-02-09 19:11:18 +03:00
|
|
|
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)
|
|
|
|
@edit_allowed = User.current.allowed_to?(:edit_issues, @project)
|
2009-05-31 03:30:36 +04:00
|
|
|
@priorities = IssuePriority.all
|
2011-04-01 18:00:31 +04:00
|
|
|
@time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
|
2007-11-05 21:38:42 +03:00
|
|
|
respond_to do |format|
|
|
|
|
format.html { render :template => 'issues/show.rhtml' }
|
2010-12-04 20:43:39 +03:00
|
|
|
format.api
|
2010-08-23 19:04:36 +04:00
|
|
|
format.atom { render :template => 'journals/index', :layout => false, :content_type => 'application/atom+xml' }
|
2009-01-04 15:03:39 +03:00
|
|
|
format.pdf { send_data(issue_to_pdf(@issue), :type => 'application/pdf', :filename => "#{@project.identifier}-#{@issue.id}.pdf") }
|
2007-10-06 03:17:49 +04:00
|
|
|
end
|
2006-09-09 20:07:02 +04:00
|
|
|
end
|
2006-06-28 22:11:03 +04:00
|
|
|
|
2008-01-20 14:30:57 +03:00
|
|
|
# Add a new issue
|
|
|
|
# The new issue will be created from an existing one if copy_from parameter is given
|
|
|
|
def new
|
2010-08-20 19:22:19 +04:00
|
|
|
respond_to do |format|
|
|
|
|
format.html { render :action => 'new', :layout => !request.xhr? }
|
|
|
|
format.js { render :partial => 'attributes' }
|
|
|
|
end
|
2010-04-22 19:43:57 +04:00
|
|
|
end
|
|
|
|
|
|
|
|
def create
|
|
|
|
call_hook(:controller_issues_new_before_save, { :params => params, :issue => @issue })
|
2011-03-30 21:40:00 +04:00
|
|
|
IssueObserver.instance.send_notification = params[:send_notification] == '0' ? false : true
|
2010-04-22 19:43:57 +04:00
|
|
|
if @issue.save
|
|
|
|
attachments = Attachment.attach_files(@issue, params[:attachments])
|
|
|
|
render_attachment_warning_if_needed(@issue)
|
|
|
|
flash[:notice] = l(:notice_successful_create)
|
|
|
|
call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue})
|
|
|
|
respond_to do |format|
|
|
|
|
format.html {
|
2010-09-12 00:21:27 +04:00
|
|
|
redirect_to(params[:continue] ? { :action => 'new', :project_id => @project, :issue => {:tracker_id => @issue.tracker, :parent_issue_id => @issue.parent_issue_id}.reject {|k,v| v.nil?} } :
|
2010-04-22 19:43:57 +04:00
|
|
|
{ :action => 'show', :id => @issue })
|
|
|
|
}
|
2010-12-04 20:43:39 +03:00
|
|
|
format.api { render :action => 'show', :status => :created, :location => issue_url(@issue) }
|
2010-04-22 19:43:57 +04:00
|
|
|
end
|
|
|
|
return
|
|
|
|
else
|
|
|
|
respond_to do |format|
|
|
|
|
format.html { render :action => 'new' }
|
2010-12-03 16:52:07 +03:00
|
|
|
format.api { render_validation_errors(@issue) }
|
2010-04-22 19:43:57 +04:00
|
|
|
end
|
|
|
|
end
|
2008-01-20 14:30:57 +03:00
|
|
|
end
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2007-03-12 20:59:02 +03:00
|
|
|
def edit
|
2010-07-29 16:48:24 +04:00
|
|
|
return render_reply(@journal) if @journal
|
2010-02-25 20:01:10 +03:00
|
|
|
update_issue_from_params
|
2008-02-10 16:17:41 +03:00
|
|
|
|
2010-03-04 19:18:51 +03:00
|
|
|
@journal = @issue.current_journal
|
|
|
|
|
2010-02-25 20:01:05 +03:00
|
|
|
respond_to do |format|
|
|
|
|
format.html { }
|
|
|
|
format.xml { }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def update
|
2010-02-25 20:01:10 +03:00
|
|
|
update_issue_from_params
|
2011-03-30 21:40:00 +04:00
|
|
|
JournalObserver.instance.send_notification = params[:send_notification] == '0' ? false : true
|
2010-03-05 20:11:50 +03:00
|
|
|
if @issue.save_issue_with_child_records(params, @time_entry)
|
|
|
|
render_attachment_warning_if_needed(@issue)
|
2010-07-15 17:23:43 +04:00
|
|
|
flash[:notice] = l(:notice_successful_update) unless @issue.current_journal == @journal
|
2010-03-05 20:11:50 +03:00
|
|
|
|
2010-02-26 19:16:18 +03:00
|
|
|
respond_to do |format|
|
|
|
|
format.html { redirect_back_or_default({:action => 'show', :id => @issue}) }
|
2010-12-03 16:52:07 +03:00
|
|
|
format.api { head :ok }
|
2007-03-12 20:59:02 +03:00
|
|
|
end
|
2010-02-26 19:16:18 +03:00
|
|
|
else
|
2010-03-05 20:11:50 +03:00
|
|
|
render_attachment_warning_if_needed(@issue)
|
2010-07-15 17:23:43 +04:00
|
|
|
flash[:notice] = l(:notice_successful_update) unless @issue.current_journal == @journal
|
2010-03-04 19:18:51 +03:00
|
|
|
@journal = @issue.current_journal
|
2010-03-05 20:11:50 +03:00
|
|
|
|
2010-01-13 22:29:19 +03:00
|
|
|
respond_to do |format|
|
2010-02-24 20:21:41 +03:00
|
|
|
format.html { render :action => 'edit' }
|
2010-12-03 16:52:07 +03:00
|
|
|
format.api { render_validation_errors(@issue) }
|
2010-01-13 22:29:19 +03:00
|
|
|
end
|
2008-01-06 20:06:14 +03:00
|
|
|
end
|
2006-09-09 20:07:02 +04:00
|
|
|
end
|
|
|
|
|
2008-02-10 16:17:41 +03:00
|
|
|
# Bulk edit a set of issues
|
|
|
|
def bulk_edit
|
2010-03-13 17:56:49 +03:00
|
|
|
@issues.sort!
|
2010-10-08 07:09:51 +04:00
|
|
|
@available_statuses = @projects.map{|p|Workflow.available_statuses(p)}.inject{|memo,w|memo & w}
|
|
|
|
@custom_fields = @projects.map{|p|p.all_issue_custom_fields}.inject{|memo,c|memo & c}
|
|
|
|
@assignables = @projects.map(&:assignable_users).inject{|memo,a| memo & a}
|
|
|
|
@trackers = @projects.map(&:trackers).inject{|memo,t| memo & t}
|
2008-02-10 16:17:41 +03:00
|
|
|
end
|
2010-08-24 19:27:12 +04:00
|
|
|
|
|
|
|
def bulk_update
|
|
|
|
@issues.sort!
|
2010-08-25 18:59:16 +04:00
|
|
|
attributes = parse_params_for_bulk_issue_attributes(params)
|
2010-08-24 19:27:12 +04:00
|
|
|
|
|
|
|
unsaved_issue_ids = []
|
|
|
|
@issues.each do |issue|
|
|
|
|
issue.reload
|
|
|
|
journal = issue.init_journal(User.current, params[:notes])
|
|
|
|
issue.safe_attributes = attributes
|
|
|
|
call_hook(:controller_issues_bulk_edit_before_save, { :params => params, :issue => issue })
|
2011-03-30 21:40:00 +04:00
|
|
|
JournalObserver.instance.send_notification = params[:send_notification] == '0' ? false : true
|
2010-08-24 19:27:12 +04:00
|
|
|
unless issue.save
|
|
|
|
# Keep unsaved issue ids to display them in flash error
|
|
|
|
unsaved_issue_ids << issue.id
|
|
|
|
end
|
|
|
|
end
|
|
|
|
set_flash_from_bulk_issue_save(@issues, unsaved_issue_ids)
|
|
|
|
redirect_back_or_default({:controller => 'issues', :action => 'index', :project_id => @project})
|
|
|
|
end
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2006-09-09 20:07:02 +04:00
|
|
|
def destroy
|
2008-03-01 01:54:07 +03:00
|
|
|
@hours = TimeEntry.sum(:hours, :conditions => ['issue_id IN (?)', @issues]).to_f
|
|
|
|
if @hours > 0
|
|
|
|
case params[:todo]
|
|
|
|
when 'destroy'
|
|
|
|
# nothing to do
|
|
|
|
when 'nullify'
|
|
|
|
TimeEntry.update_all('issue_id = NULL', ['issue_id IN (?)', @issues])
|
|
|
|
when 'reassign'
|
|
|
|
reassign_to = @project.issues.find_by_id(params[:reassign_to_id])
|
|
|
|
if reassign_to.nil?
|
|
|
|
flash.now[:error] = l(:error_issue_not_found_in_project)
|
|
|
|
return
|
|
|
|
else
|
|
|
|
TimeEntry.update_all("issue_id = #{reassign_to.id}", ['issue_id IN (?)', @issues])
|
|
|
|
end
|
|
|
|
else
|
2010-12-03 16:52:07 +03:00
|
|
|
# display the destroy form if it's a user request
|
|
|
|
return unless api_request?
|
2008-03-01 01:54:07 +03:00
|
|
|
end
|
|
|
|
end
|
2011-04-01 20:26:53 +04:00
|
|
|
@issues.each do |issue|
|
|
|
|
begin
|
|
|
|
issue.reload.destroy
|
|
|
|
rescue ::ActiveRecord::RecordNotFound # raised by #reload if issue no longer exists
|
|
|
|
# nothing to do, issue was already deleted (eg. by a parent)
|
|
|
|
end
|
|
|
|
end
|
2010-01-13 22:29:19 +03:00
|
|
|
respond_to do |format|
|
2010-10-07 09:11:28 +04:00
|
|
|
format.html { redirect_back_or_default(:action => 'index', :project_id => @project) }
|
2010-12-03 16:52:07 +03:00
|
|
|
format.api { head :ok }
|
2010-01-13 22:29:19 +03:00
|
|
|
end
|
2007-03-12 20:59:02 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
2008-01-20 14:30:57 +03:00
|
|
|
def find_issue
|
2007-03-12 20:59:02 +03:00
|
|
|
@issue = Issue.find(params[:id], :include => [:project, :tracker, :status, :author, :priority, :category])
|
|
|
|
@project = @issue.project
|
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
|
|
render_404
|
2007-08-31 21:02:44 +04:00
|
|
|
end
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2008-01-20 14:30:57 +03:00
|
|
|
def find_project
|
2010-01-13 22:29:19 +03:00
|
|
|
project_id = (params[:issue] && params[:issue][:project_id]) || params[:project_id]
|
|
|
|
@project = Project.find(project_id)
|
2008-01-20 14:30:57 +03:00
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
|
|
render_404
|
|
|
|
end
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2010-02-25 20:01:10 +03:00
|
|
|
# Used by #edit and #update to set some common instance variables
|
|
|
|
# from the params
|
|
|
|
# TODO: Refactor, not everything in here is needed by #edit
|
|
|
|
def update_issue_from_params
|
|
|
|
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)
|
|
|
|
@priorities = IssuePriority.all
|
|
|
|
@edit_allowed = User.current.allowed_to?(:edit_issues, @project)
|
2011-04-01 18:00:31 +04:00
|
|
|
@time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
|
2010-11-17 21:27:38 +03:00
|
|
|
@time_entry.attributes = params[:time_entry]
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2010-08-28 00:08:59 +04:00
|
|
|
@notes = params[:notes] || (params[:issue].present? ? params[:issue][:notes] : nil)
|
2010-03-04 19:18:51 +03:00
|
|
|
@issue.init_journal(User.current, @notes)
|
2010-11-11 19:37:16 +03:00
|
|
|
@issue.safe_attributes = params[:issue]
|
2010-07-15 17:23:43 +04:00
|
|
|
@journal = @issue.current_journal
|
2010-02-25 20:01:10 +03:00
|
|
|
end
|
2010-03-11 19:34:08 +03:00
|
|
|
|
2010-04-23 19:05:13 +04:00
|
|
|
# TODO: Refactor, lots of extra code in here
|
2010-09-26 17:52:25 +04:00
|
|
|
# TODO: Changing tracker on an existing issue should not trigger this
|
2010-04-23 19:05:13 +04:00
|
|
|
def build_new_issue_from_params
|
2010-08-20 19:22:19 +04:00
|
|
|
if params[:id].blank?
|
|
|
|
@issue = Issue.new
|
|
|
|
@issue.copy_from(params[:copy_from]) if params[:copy_from]
|
|
|
|
@issue.project = @project
|
|
|
|
else
|
|
|
|
@issue = @project.issues.visible.find(params[:id])
|
|
|
|
end
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2010-04-23 19:05:13 +04:00
|
|
|
@issue.project = @project
|
|
|
|
# Tracker must be set before custom field values
|
|
|
|
@issue.tracker ||= @project.trackers.find((params[:issue] && params[:issue][:tracker_id]) || params[:tracker_id] || :first)
|
|
|
|
if @issue.tracker.nil?
|
|
|
|
render_error l(:error_no_tracker_in_project)
|
|
|
|
return false
|
|
|
|
end
|
2010-11-07 02:23:02 +03:00
|
|
|
@issue.start_date ||= Date.today
|
2010-04-23 19:05:13 +04:00
|
|
|
if params[:issue].is_a?(Hash)
|
|
|
|
@issue.safe_attributes = params[:issue]
|
2010-09-26 17:52:25 +04:00
|
|
|
if User.current.allowed_to?(:add_issue_watchers, @project) && @issue.new_record?
|
|
|
|
@issue.watcher_user_ids = params[:issue]['watcher_user_ids']
|
|
|
|
end
|
2010-04-23 19:05:13 +04:00
|
|
|
end
|
|
|
|
@issue.author = User.current
|
|
|
|
@priorities = IssuePriority.all
|
|
|
|
@allowed_statuses = @issue.new_statuses_allowed_to(User.current, true)
|
|
|
|
end
|
|
|
|
|
2010-04-26 19:08:06 +04:00
|
|
|
def check_for_default_issue_status
|
|
|
|
if IssueStatus.default.nil?
|
|
|
|
render_error l(:error_no_default_issue_status)
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
end
|
2010-08-25 18:59:16 +04:00
|
|
|
|
|
|
|
def parse_params_for_bulk_issue_attributes(params)
|
|
|
|
attributes = (params[:issue] || {}).reject {|k,v| v.blank?}
|
|
|
|
attributes.keys.each {|k| attributes[k] = '' if attributes[k] == 'none'}
|
|
|
|
attributes[:custom_field_values].reject! {|k,v| v.blank?} if attributes[:custom_field_values]
|
|
|
|
attributes
|
|
|
|
end
|
2006-06-28 22:11:03 +04:00
|
|
|
end
|