Feature #16045 » last_assignee_wip.diff
| app/helpers/application_helper.rb (working copy) | ||
|---|---|---|
|
end
|
||
|
# Returns a string for users/groups option tags
|
||
|
def principals_options_for_select(collection, selected=nil)
|
||
|
def principals_options_for_select(collection, selected = nil)
|
||
|
s = ''
|
||
|
if collection.include?(User.current)
|
||
|
s << content_tag('option', "<< #{l(:label_me)} >>", :value => User.current.id)
|
||
|
s << content_tag('option', "<< #{l(:label_me_accusative, default: l(:label_me))} >>", value: User.current.id) # corrected for proper german (mich instead of ich!)
|
||
|
end
|
||
|
# TODO: add this to Redmine Core and throw away the reference to the @issue instance variable
|
||
|
# The instance variable is used (instead of another parameter) to avoid the necessity of overriding the issues/_attributes partial
|
||
|
unless @issue.nil? # do not add option in case of bulk and issue category edit
|
||
|
last_assignee_id = @issue.last_assigned_to
|
||
|
s << content_tag('option', "<< #{t('issue.last_assignee', name: User.find_by_id(last_assignee_id).try(:name))} >>",
|
||
|
value: last_assignee_id) if (last_assignee_id && (last_assignee_id != User.current.id))
|
||
|
end
|
||
|
groups = ''
|
||
|
collection.sort.each do |element|
|
||
|
selected_attribute = ' selected="selected"' if option_value_selected?(element, selected) || element.id.to_s == selected
|
||
| app/models/issue.rb (working copy) | ||
|---|---|---|
|
scope
|
||
|
end
|
||
|
# Returns the last assigned_to_id from the issue history
|
||
|
def last_assigned_to
|
||
|
journals.reverse_each do |j|
|
||
|
last_assignee_change = j.detail_for_attribute 'assigned_to_id'
|
||
|
return last_assignee_change.old_value.to_i if last_assignee_change && last_assignee_change.old_value
|
||
|
end
|
||
|
nil # return nil instead of an empty array
|
||
|
end
|
||
|
# Returns the initial status of the issue
|
||
|
# Returns nil for a new issue
|
||
|
def status_was
|
||
| config/locales/de.yml (working copy) | ||
|---|---|---|
|
label_only: nur
|
||
|
label_max_size: Maximale Größe
|
||
|
label_me: ich
|
||
|
label_me_accusative: mich
|
||
|
last_assignee: "ZULETZT: %{name}"
|
||
|
label_member: Mitglied
|
||
|
label_member_new: Neues Mitglied
|
||
|
label_member_plural: Mitglieder
|
||
| config/locales/en.yml (working copy) | ||
|---|---|---|
|
label_disabled: disabled
|
||
|
label_show_completed_versions: Show completed versions
|
||
|
label_me: me
|
||
|
last_assignee: "LAST: %{name}"
|
||
|
label_board: Forum
|
||
|
label_board_new: New forum
|
||
|
label_board_plural: Forums
|
||