Graciously handle deleted custom fields on issue history view.
This commit is contained in:
parent
92dd2934ae
commit
6fcb1de63a
@ -798,6 +798,7 @@ de:
|
|||||||
label_project_copy_notifications: Sende Mailbenachrichtigungen beim Kopieren des Projekts.
|
label_project_copy_notifications: Sende Mailbenachrichtigungen beim Kopieren des Projekts.
|
||||||
label_principal_search: "Nach Benutzer oder Gruppe suchen:"
|
label_principal_search: "Nach Benutzer oder Gruppe suchen:"
|
||||||
label_user_search: "Nach Benutzer suchen:"
|
label_user_search: "Nach Benutzer suchen:"
|
||||||
|
label_deleted_custom_field: '(gelöschtes benutzerdefiniertes Feld)'
|
||||||
|
|
||||||
button_login: Anmelden
|
button_login: Anmelden
|
||||||
button_submit: OK
|
button_submit: OK
|
||||||
|
@ -812,6 +812,7 @@ en:
|
|||||||
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
|
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
|
||||||
label_notify_member_plural: Email issue updates
|
label_notify_member_plural: Email issue updates
|
||||||
label_path_encoding: Path encoding
|
label_path_encoding: Path encoding
|
||||||
|
label_deleted_custom_field: '(deleted custom field)'
|
||||||
|
|
||||||
button_login: Login
|
button_login: Login
|
||||||
button_submit: Submit
|
button_submit: Submit
|
||||||
|
@ -793,6 +793,7 @@ fr:
|
|||||||
label_user_search: "Rechercher un utilisateur :"
|
label_user_search: "Rechercher un utilisateur :"
|
||||||
label_additional_workflow_transitions_for_author: Autorisations supplémentaires lorsque l'utilisateur a créé la demande
|
label_additional_workflow_transitions_for_author: Autorisations supplémentaires lorsque l'utilisateur a créé la demande
|
||||||
label_additional_workflow_transitions_for_assignee: Autorisations supplémentaires lorsque la demande est assignée à l'utilisateur
|
label_additional_workflow_transitions_for_assignee: Autorisations supplémentaires lorsque la demande est assignée à l'utilisateur
|
||||||
|
label_deleted_custom_field: '(champ personnalisé supprimé)'
|
||||||
|
|
||||||
button_login: Connexion
|
button_login: Connexion
|
||||||
button_submit: Soumettre
|
button_submit: Soumettre
|
||||||
|
@ -199,5 +199,10 @@ class IssuesTest < ActionController::IntegrationTest
|
|||||||
:content => new_tester.name
|
:content => new_tester.name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Test for deleted custom field handling
|
||||||
|
@field.destroy
|
||||||
|
get "/issues/#{issue.id}"
|
||||||
|
assert_response :success
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -83,9 +83,15 @@ module JournalFormatter
|
|||||||
end
|
end
|
||||||
|
|
||||||
def format_custom_value_detail(custom_field, values, no_html)
|
def format_custom_value_detail(custom_field, values, no_html)
|
||||||
label = custom_field.name
|
if custom_field
|
||||||
old_value = format_value(values.first, custom_field.field_format) if values.first
|
label = custom_field.name
|
||||||
value = format_value(values.last, custom_field.field_format) if values.last
|
old_value = format_value(values.first, custom_field.field_format) if values.first
|
||||||
|
value = format_value(values.last, custom_field.field_format) if values.last
|
||||||
|
else
|
||||||
|
label = l(:label_deleted_custom_field)
|
||||||
|
old_value = values.first
|
||||||
|
value = values.last
|
||||||
|
end
|
||||||
|
|
||||||
[label, old_value, value]
|
[label, old_value, value]
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user