redmine_changeable_author_v2.1.6.patch

Patch for ability to change issue autor. Redmine 2.1.6 - Aighan Pacobilch, 2013-09-02 17:39

Download (8.18 KB)

View differences:

app/helpers/issues_helper.rb
252 252
        old_value = format_date(detail.old_value.to_date) if detail.old_value
253 253

  
254 254
      when 'project_id', 'status_id', 'tracker_id', 'assigned_to_id',
255
            'priority_id', 'category_id', 'fixed_version_id'
255
            'priority_id', 'category_id', 'fixed_version_id', 'author_id'
256 256
        value = find_name_by_reflection(field, detail.value)
257 257
        old_value = find_name_by_reflection(field, detail.old_value)
app/models/issue.rb
323 323
  safe_attributes 'tracker_id',
324 324
    'status_id',
325 325
    'category_id',
326
    'author_id',
326 327
    'assigned_to_id',
327 328
    'priority_id',
328 329
    'fixed_version_id',
app/views/issues/_attributes.html.erb
3 3
<div class="splitcontent">
4 4
<div class="splitcontentleft">
5 5
<% if @issue.safe_attribute? 'status_id'  %>
6
<% if User.current.allowed_to?(:edit_issue_author, @project) %>
7
<p><%= f.select :author_id, (@issue.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => false, :required => true %></p>
8
<% end %>
6 9
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true},
7 10
                :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p>
app/views/issues/show.html.erb
26 26
</div>
27 27
        <p class="author">
28 28
        <%= authoring @issue.created_on, @issue.author %>.
29
        <%= l(:label_added_time, time_tag(@issue.created_on)) %>.
29 30
        <% if @issue.created_on != @issue.updated_on %>
30 31
        <%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>.
31 32
        <% end %>
......
33 34

  
34 35
<table class="attributes">
35 36
<%= issue_fields_rows do |rows|
37
  rows.left l(:field_author), h(@issue.author), :class => 'author'
36 38
  rows.left l(:field_status), h(@issue.status.name), :class => 'status'
37 39
  rows.left l(:field_priority), h(@issue.priority.name), :class => 'priority'
config/locales/cs.yml
385 385
  permission_add_issue_notes: Přidávání poznámek
386 386
  permission_edit_issue_notes: Upravování poznámek
387 387
  permission_edit_own_issue_notes: Upravování vlastních poznámek
388
  permission_edit_issue_author: Úprava autora
388 389
  permission_move_issues: Přesouvání úkolů
389 390
  permission_delete_issues: Mazání úkolů
390 391
  permission_manage_public_queries: Správa veřejných dotazů
......
731 732
  label_feeds_access_key_created_on: "Přístupový klíč pro RSS byl vytvořen před %{value}"
732 733
  label_module_plural: Moduly
733 734
  label_added_time_by: "Přidáno uživatelem %{author} před %{age}"
735
  label_added_time: "Přidáno před {age}"
734 736
  label_updated_time_by: "Aktualizováno uživatelem %{author} před %{age}"
735 737
  label_updated_time: "Aktualizováno před %{value}"
736 738
  label_jump_to_a_project: Vyberte projekt...
config/locales/en.yml
416 416
  permission_add_issue_notes: Add notes
417 417
  permission_edit_issue_notes: Edit notes
418 418
  permission_edit_own_issue_notes: Edit own notes
419
  permission_edit_issue_author: Edit author
419 420
  permission_move_issues: Move issues
420 421
  permission_delete_issues: Delete issues
421 422
  permission_manage_public_queries: Manage public queries
......
777 778
  label_feeds_access_key_created_on: "RSS access key created %{value} ago"
778 779
  label_module_plural: Modules
779 780
  label_added_time_by: "Added by %{author} %{age} ago"
781
  abel_added_time: "Added {value} ago"
780 782
  label_updated_time_by: "Updated by %{author} %{age} ago"
781 783
  label_updated_time: "Updated %{value} ago"
782 784
  label_jump_to_a_project: Jump to a project...
config/locales/ru.yml
407 407
  label_activity: Действия
408 408
  label_add_another_file: Добавить ещё один файл
409 409
  label_added_time_by: "Добавил(а) %{author} %{age} назад"
410
  label_added_time: "Добавлено {value} назад"
410 411
  label_added: добавлено
411 412
  label_add_note: Добавить замечание
412 413
  label_administration: Администрирование
......
812 813
  permission_edit_issues: Редактирование задач
813 814
  permission_edit_messages: Редактирование сообщений
814 815
  permission_edit_own_issue_notes: Редактирование собственных примечаний
816
  permission_edit_issue_author: Изменить автора
815 817
  permission_edit_own_messages: Редактирование собственных сообщений
816 818
  permission_edit_own_time_entries: Редактирование собственного учёта времени
817 819
  permission_edit_project: Редактирование проектов
config/locales/sk.yml
584 584
  label_feeds_access_key_created_on: "Prístupový klúč pre RSS bol vytvorený pred %{value}"
585 585
  label_module_plural: Moduly
586 586
  label_added_time_by: "Pridané užívateľom %{author} pred %{age}"
587
  label_added_time: "Pridané pred {value}"
587 588
  label_updated_time: "Aktualizované pred %{value}"
588 589
  label_jump_to_a_project: Zvoliť projekt...
589 590
  label_file_plural: Súbory
......
788 789
  permission_rename_wiki_pages: Premenovanie Wiki strániek
789 790
  permission_edit_time_entries: Úprava záznamov o strávenom čase
790 791
  permission_edit_own_issue_notes: Úprava vlastných poznámok úlohy
792
  permission_edit_issue_author: Úprava autora
791 793
  setting_gravatar_enabled: Použitie užívateľských Gravatar ikon
792 794
  permission_edit_own_messages: Úprava vlastných správ
793 795
  permission_delete_own_messages: Mazanie vlastných správ
config/locales/uk.yml
541 541
  label_feeds_access_key_created_on: "Ключ доступу RSS створений %{value} назад "
542 542
  label_module_plural: Модулі
543 543
  label_added_time_by: "Доданий %{author} %{age} назад"
544
  label_added_time: "Доданий {value} назад"
544 545
  label_updated_time: "Оновлений %{value} назад"
545 546
  label_jump_to_a_project: Перейти до проекту...
546 547
  label_file_plural: Файли
......
785 786
  permission_rename_wiki_pages: Rename wiki pages
786 787
  permission_edit_time_entries: Edit time logs
787 788
  permission_edit_own_issue_notes: Edit own notes
789
  permission_edit_issue_author: Змінити автора
788 790
  setting_gravatar_enabled: Use Gravatar user icons
789 791
  label_example: Example
790 792
  text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
lib/redmine.rb
78 78
    map.permission :add_issue_notes, {:issues => [:edit, :update], :journals => [:new], :attachments => :upload}
79 79
    map.permission :edit_issue_notes, {:journals => :edit}, :require => :loggedin
80 80
    map.permission :edit_own_issue_notes, {:journals => :edit}, :require => :loggedin
81
    map.permission :edit_issue_author, {}
81 82
    map.permission :move_issues, {:issues => [:bulk_edit, :bulk_update]}, :require => :loggedin
82 83
    map.permission :delete_issues, {:issues => :destroy}, :require => :member
83 84
    # Queries