Skip to content

Commit

Permalink
Release OpenProject 15.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
machisuji committed Nov 20, 2024
2 parents 4dd7217 + 16e6a9a commit 6a1e8b8
Show file tree
Hide file tree
Showing 75 changed files with 895 additions and 618 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@
classes: "work-packages-activities-tab-journals-item-component--user-name ellipsis hidden-for-mobile") do
truncated_user_name(journal.user)
end
if journal.initial?
header_start_container.with_column(
mr: 1,
classes: "work-packages-activities-tab-journals-item-component-details--journal-type hidden-for-mobile"
) do
render(Primer::Beta::Text.new(font_size: :small, color: :subtle, mt: 1)) do
I18n.t("activities.work_packages.activity_tab.created_on")
end
end
end
header_start_container.with_column(mr: 1, classes: "hidden-for-mobile") do
render(Primer::Beta::Text.new(font_size: :small, color: :subtle, mt: 1)) { format_time(journal.updated_at) }
end
Expand Down
71 changes: 37 additions & 34 deletions app/controllers/work_packages/activities_tab_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,28 +106,33 @@ def cancel_edit
end

def create
call = create_journal_service_call
begin
call = create_journal_service_call

if call.success? && call.result
set_last_server_timestamp_to_headers
handle_successful_create_call(call)
else
handle_failed_create_call(call) # errors should be rendered in the form
@turbo_status = :bad_request
if call.success? && call.result
set_last_server_timestamp_to_headers
handle_successful_create_call(call)
else
handle_failed_create_or_update_call(call)
end
rescue StandardError => e
handle_internal_server_error(e)
end

respond_with_turbo_streams
end

def update
call = Journals::UpdateService.new(model: @journal, user: User.current).call(
notes: journal_params[:notes]
)
begin
call = update_journal_service_call

if call.success? && call.result
update_item_show_component(journal: call.result, grouped_emoji_reactions: grouped_emoji_reactions_for_journal)
else
handle_failed_update_call(call)
if call.success? && call.result
update_item_show_component(journal: call.result, grouped_emoji_reactions: grouped_emoji_reactions_for_journal)
else
handle_failed_create_or_update_call(call)
end
rescue StandardError => e
handle_internal_server_error(e)
end

respond_with_turbo_streams
Expand Down Expand Up @@ -182,19 +187,11 @@ def respond_with_error(error_message)
# turbo_stream requests (tab is already rendered and an error occured in subsequent requests) are handled below
format.turbo_stream do
@turbo_status = :not_found
render_error_banner_via_turbo_stream(error_message)
render_error_flash_message_via_turbo_stream(message: error_message)
end
end
end

def render_error_banner_via_turbo_stream(error_message)
update_via_turbo_stream(
component: WorkPackages::ActivitiesTab::ErrorStreamComponent.new(
error_message:
)
)
end

def find_work_package
@work_package = WorkPackage.find(params[:work_package_id])
rescue ActiveRecord::RecordNotFound
Expand Down Expand Up @@ -259,22 +256,22 @@ def perform_update_streams_from_last_update_timestamp
end
end

def handle_failed_create_call(call)
update_via_turbo_stream(
component: WorkPackages::ActivitiesTab::Journals::NewComponent.new(
work_package: @work_package,
journal: call.result,
form_hidden_initially: false
)
)
end

def handle_failed_update_call(call)
def handle_failed_create_or_update_call(call)
@turbo_status = if call.errors&.first&.type == :error_unauthorized
:forbidden
else
:bad_request
end
render_error_flash_message_via_turbo_stream(
message: call.errors&.full_messages&.join(", ")
)
end

def handle_internal_server_error(error)
@turbo_status = :internal_server_error
render_error_flash_message_via_turbo_stream(
message: error.message
)
end

def replace_whole_tab
Expand Down Expand Up @@ -306,6 +303,12 @@ def create_journal_service_call
###
end

def update_journal_service_call
Journals::UpdateService.new(model: @journal, user: User.current).call(
notes: journal_params[:notes]
)
end

def generate_time_based_update_streams(last_update_timestamp)
journals = @work_package
.journals
Expand Down
6 changes: 3 additions & 3 deletions config/locales/crowdin/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2815,9 +2815,9 @@ de:
notice_locking_conflict: "Die Informationen wurde zwischenzeitlich von einem anderen Benutzer geändert."
notice_locking_conflict_additional_information: "Die Änderung(en) wurde(n) durchgeführt von %{users}."
notice_locking_conflict_reload_page: "Bitte laden Sie die Seite neu, prüfen Sie die Anpassungen und geben Sie Ihre Änderungen noch einmal ein."
notice_locking_conflict_warning: "This page has been updated by someone else. To not lose your edits, copy them locally and reload to view the updated version."
notice_locking_conflict_danger: "Could not save your changes because of conflicting modifications. To not lose your edits, copy them locally and reload to view the updated version."
notice_locking_conflict_action_button: "Discard changes and reload"
notice_locking_conflict_warning: "Diese Seite wurde von jemand anderem aktualisiert. Um Ihre Änderungen nicht zu verlieren, kopieren Sie sie lokal und laden Sie sie erneut, um die aktualisierte Version anzuzeigen."
notice_locking_conflict_danger: "Ihre Änderungen konnten wegen in Konflikt stehender Änderungen nicht gespeichert werden. Um Ihre Änderungen nicht zu verlieren, kopieren Sie sie lokal und laden Sie sie erneut, um die aktualisierte Version anzuzeigen."
notice_locking_conflict_action_button: "Änderungen verwerfen und neu laden"
notice_member_added: '%{name} zum Projekt hinzugefügt.'
notice_members_added: '%{number} Benutzer zum Projekt hinzugefügt.'
notice_member_removed: "%{user} aus dem Projekt entfernt."
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-ko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ ko:
"15_0":
standard:
new_features_html: >
The release brings various features and improvements for you, e.g. <br> <ul class="%{list_styling_class}"> <li>Boost your communication with a better structured Activity tab, real-time loading messages and notifications, emoji reactions, and more.</li> <li>Benefit from easy Single Sign-On authentication settings with SAML and OIDC in your Enterprise Cloud administration.</li> <li>Use the new 'Standard global role' and enable permissions to view email addresses.</li> <li>Enjoy easier navigation in project lists with quick action table headers.</li> <li>Experience simplified design settings with fewer sidebar design variables needed.</li> <li>Reduce manual cleanup when adding a custom field to a type – no more auto-applying to all projects.</li> <li>Benefit from improved navigation clarity – 'My account' is renamed to 'Account settings'.</li> </ul>
이 릴리즈는 다음과 같은 다양한 기능과 개선 사항을 제공합니다. <br> <ul class="%{list_styling_class}"> <li>더욱 체계화된 활동 탭, 실시간 로딩 메시지 및 알림, 이모티콘 반응 등으로 커뮤니케이션을 강화합니다.</li> <li>Enterprise Cloud 관리에서 SAML 및 OIDC로 간편한 Single Sign-On 인증 설정의 장점을 누립니다.</li> <li>새로운 '표준 글로벌 역할'을 사용하고 이메일 주소를 볼 수 있는 권한을 활성화합니다.</li> <li>빠른 작업 테이블 헤더로 프로젝트 목록에서 더욱 쉽게 탐색합니다.</li> <li>필요한 사이드바 디자인 변수가 더 적은 간소화된 디자인 설정을 이용합니다.</li> <li>유형에 사용자 지정 필드를 추가할 때 수동 정리가 줄어듭니다. 더 이상 모든 프로젝트에 자동 적용되지 않습니다.</li> <li>탐색의 명확성이 개선되었습니다. '내 계정'이 '계정 설정'으로 이름이 변경되었습니다.</li> </ul>
ical_sharing_modal:
title: "캘린더 구독"
inital_setup_error_message: "데이터를 가져오는 중에 오류가 발생했습니다."
Expand Down
6 changes: 3 additions & 3 deletions config/locales/crowdin/js-pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,10 @@ pt-BR:
wiki: "Na <b>wiki</b>, você pode documentar e compartilhar conhecimento junto com sua equipe. "
backlogs:
overview: "Gerencie seu trabalho na visão de <b>backlogs</b>."
sprints: "À direita você encontra o backlog do produto e de erros, à esquerda você encontra os respectivos sprints. Aqui você pode criar <b>épicos, histórias de usuário e bugs</b>, priorizar através de arrastar e soltar e adicioná-los a um sprint."
task_board_arrow: "Para ver o seu <b>quadro de tarefas</b>, abra o menu suspenso de sprint ... "
sprints: "À direita, você tem o backlog de produto e o backlog de erro, à esquerda, você tem as respectivas sprints. Aqui você pode criar <b>épicos, user stories e erros</b>, priorizar via arrastar e soltar e adicioná-los a uma sprint."
task_board_arrow: "Para ver o seu <b>quadro de tarefas</b>, abra o menu suspenso da sprint..."
task_board_select: "... e selecione a entrada do <b>quadro de tarefas</b>. "
task_board: "O painel de tarefas visualiza o <b>progresso deste sprint</b>. Clique no ícone mais (+) ao lado de uma história de usuário para adicionar novas tarefas ou impedimentos. <br> A situação pode ser atualizada arrastando e soltando."
task_board: "O quadro de tarefas visualiza o <b>progresso desta sprint</b>. Clique no ícone de mais (+) ao lado de uma user story para adicionar novas tarefas ou impedimentos. <br> O status pode ser atualizado por arrastar e soltar."
boards:
overview: "Selecione <b>quadros</b> para mudar a visão e gerenciar seu projeto usando a exibição de quadros ágeis."
lists_kanban: "Aqui você pode criar várias listas (colunas) dentro do seu painel. Este recurso permite que você crie um <b>Quadro Kanban</b>, por exemplo."
Expand Down
Loading

0 comments on commit 6a1e8b8

Please sign in to comment.