Project

General

Profile

default 'Assigned to:' and change to another user

Added by Ingolf Steinhardt about 15 years ago

Hi,

I used the workaround to ticket #3736

I add a row in
../app/models/issue.rb
add string "self.assigned_to ||= User.find_by_id(1)" where 1-your user's id.

  def after_initialize
    if new_record?
      # set default values for new records only
      self.status ||= IssueStatus.default
      self.priority ||= Enumeration.default('IPRI')
    self.assigned_to ||= User.find_by_id(1)
    end
  end

this works fine - but if I change the user to an other I have after create a ticket again user 1 as assigned user.

How can I change the default user only for the view?

thanks!

query1