Project

General

Profile

default 'Assigned to:' without categories

Added by Peter Volkov about 15 years ago

Hello. Is it possible to set default value for 'Assigned to:' filed? I know there exist such possibility based on Category, but we avoid usage of Categoried in our project so I'd like all issues by default to be assigned on me. Is this possible? Thank you in advance for any hints.


Replies (7)

RE: default 'Assigned to:' without categories - Added by Brad Beattie about 15 years ago

I don't believe it's possible yet, but I'd like the same functionality. I'll see if I can get something like that working tonight.

RE: default 'Assigned to:' without categories - Added by Peter Volkov about 15 years ago

Brad, it'll be great if you manage to do that. Thank you for your answer, now I know that I'm not missing anything evident. :)

RE: default 'Assigned to:' without categories - Added by Brandon Dixon about 15 years ago

I would like to have this as well. Can someone please update this ticket when and if the feature is available?

RE: default 'Assigned to:' without categories - Added by Tim Aleinikoff about 15 years ago

I have done it, theat way:
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')
    end
  end
сделав
  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

It is not "oldschool" way, but it works =)

RE: default 'Assigned to:' without categories - Added by Peter Volkov almost 15 years ago

Thank you very much Tim! Not best way but for our small project this way works!!! :)

RE: default 'Assigned to:' without categories - Added by James Robertson almost 15 years ago

Would someone here like to assign themselves ticket #482?

RE: default 'Assigned to:' without categories - Added by Ingolf Steinhardt over 14 years ago

Tim Aleinikoff wrote:

I have done it, theat way:
In ../app/models/issue.rb
add string "self.assigned_to ||= User.find_by_id(1)" where 1-your user's id.

[...]

It is not "oldschool" way, but it works =)

yes this works fine if every time the assigned user with id "1"

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

The "workaround" is to change the assigned user after create... :-((

How can I "bugfixing" this???

query1

    (1-7/7)