From 47983edb35c967e5b3ced769e7e0c4d827ac0c46 Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Tue, 12 Mar 2024 18:36:10 +0100 Subject: [PATCH] add watcher for assigned issues --- config/locales/cs.yml | 7 ++++--- config/locales/de.yml | 7 ++++--- config/locales/en.yml | 7 ++++--- config/locales/es.yml | 7 ++++--- config/locales/fr.yml | 7 ++++--- config/locales/it.yml | 7 ++++--- config/locales/ja.yml | 7 ++++--- config/locales/ko.yml | 7 ++++--- config/locales/pl.yml | 7 ++++--- config/locales/pt-BR.yml | 7 ++++--- config/locales/ru.yml | 7 ++++--- config/locales/zh-TW.yml | 7 ++++--- config/locales/zh.yml | 7 ++++--- lib/additionals/patches/issue_patch.rb | 11 +++++++++++ lib/additionals/patches/user_preference_patch.rb | 2 ++ test/unit/issue_test.rb | 11 +++++++++++ 16 files changed, 76 insertions(+), 39 deletions(-) diff --git a/config/locales/cs.yml b/config/locales/cs.yml index dc193c36..e4737de7 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -60,6 +60,7 @@ cs: google_maps_embed_api_html: "V případě, že chcete k zobrazení map Goole použít makro Gmap, implementujte zde klíč API Google Maps API. Poté můžete použít makro a různé parametry. Více informací o tom, jak používat parametry, naleznete na https://developers.google.com/maps/documentation/embed/guide. Makro Gmap zde funguje pouze v kombinaci s vloženým klíčem." hidden_macros_in_toolbar_info: "Všechna dostupná makra, která může přihlášený uživatel použít, jsou uvedena prostřednictvím tlačítka makro na panelu nástrojů wiki. Makra zde označená nejsou nabízena k výběru. To vám umožní omezit rozsah seznamu." info_hidden_roles_html: "Skryté role lze použít pouze spolu s viditelností uživatele \"Members of visible projects\". Pokud uživatel není v roli, která je viditelná pro aktuálního uživatele, je tato role včetně uživatele skryta na stránce s přehledem projektu a v seznamech dotazů." + info_issue_hide_max_attachments: "Pokud je zde zadán vyšší počet souborů, zobrazí se všechny přílohy k danému vydání skrytě." info_live_search_result_restriction: "Výsledky vyhledávání LiveSearch jsou omezeny na %{value} zásahy. Zkuste své hledání popsat podrobněji." label_account_login_bottom: "Text pro přihlašovací stránku" label_activate_quickstart: Aktivovat quickstart @@ -71,6 +72,7 @@ cs: label_additionals_message: "Zpráva" label_all_projects: "Všechny projekty" label_app_menu: App menu + label_auto_watch_on_issue_assigned: Issues assigned to me label_change_is_private: "Změnit soukromé / neveřejné" label_change_to_dashboard: "Přepnout na Dashboard" label_chart_color_schema: "Barevné schéma grafů" @@ -93,6 +95,7 @@ cs: label_disable_sidebar: "Zakázat sidebar" label_disabled_modules: "Zakázané moduly" label_docs_access_token: Access token + label_document_view_all: "Zobrazit všechny dokumenty" label_emoji_support: Emoji Podpora label_enable_auto_refresh: "Povolit automatické obnovení" label_enable_sidebar: "Umožnit sidebar" @@ -116,6 +119,7 @@ cs: label_issue_fast_description_edit: "Rychlá úprava popisu" label_issue_freezed_with_close: "Zakázat úpravy uzavřených čísel (Freeze)" label_issue_genitive: "Úkol" + label_issue_hide_max_attachments: "Zobrazit max. soubory" label_issue_note_with_author: "Zobrazit autora úlohy s poznámkou" label_issue_status_change: "If \"Assignee\" is unchanged and the issue status changed from x to y, than the author is assigned to the issue" label_issue_timelog_required: "Časový záznam potřebných problémů" @@ -209,6 +213,3 @@ cs: top_wiki_help: "Zde můžete definovat obsah a nastavení vaší Wiki." wiki_pdf_remove_attachments_info: "Pokud je aktivní, připojené soubory Wiki se nebudou zobrazovat v zobrazení PDF." wiki_pdf_remove_title_info: "Pokud je aktivní, informace o názvu Wiki se nebudou zobrazovat v zobrazení PDF." - label_document_view_all: "Zobrazit všechny dokumenty" - label_issue_hide_max_attachments: "Zobrazit max. soubory" - info_issue_hide_max_attachments: "Pokud je zde zadán vyšší počet souborů, zobrazí se všechny přílohy k danému vydání skrytě." diff --git a/config/locales/de.yml b/config/locales/de.yml index 4b195bcb..eedae688 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -60,6 +60,7 @@ de: google_maps_embed_api_html: Wenn Du das Gmap Makro verwenden willst um Google Karten darzustellen, musst Du hier Deinen Google Maps Embed API Schlüssel eintragen. Mehr Informationen dazu findest Du unter https://developers.google.com/maps/documentation/embed/guide. Wird hier kein Schlüssel eingetragen, kann das gmap Makro nicht verwendet werden. hidden_macros_in_toolbar_info: Alle verfügbaren Makros, die der angemeldete Benutzer verwenden kann, werden über den Makro-Button der Wiki-Toolbar aufgelistet. Hier markierte Makros werden nicht zur Auswahl angeboten. Damit lässt sich der Listenumfang einschränken. info_hidden_roles_html: Versteckte Rollen können nur zusammen mit der Benutzersichtbarkeit "Mitglieder von sichtbaren Projekten" verwendet werden. Diese Option funktioniert nur, wenn der Benutzer in keiner Rolle ist die für den aktuellen Benutzer sichtbar ist. Passt alles wird diese Rolle inklusive Benutzer auf der Projektübersichtsseite und in Abfragelisten ausgeblendet. + info_issue_hide_max_attachments: Wird die hier angegebene Anzahl überschritten, werden alle Dateianhänge im Ticket eingeklappt/versteckt dargestellt. info_live_search_result_restriction: LiveSearch Ergebnisse sind auf %{value} Treffer begrenzt. Versuche Deine Suche genauer zu beschreiben. label_account_login_bottom: "Text für Anmeldeseite" label_activate_quickstart: Schnellstart aktivieren @@ -71,6 +72,7 @@ de: label_additionals_message: Hinweistext label_all_projects: Alle Projekte label_app_menu: App Menü + label_auto_watch_on_issue_assigned: Tickets, die mir zugewiesen werden label_change_is_private: Privat/Nicht-Privat ändern label_change_to_dashboard: Zu Dashboard wechseln label_chart_color_schema: Charts Farbschema @@ -93,6 +95,7 @@ de: label_disable_sidebar: Sidebar deaktivieren label_disabled_modules: "Deaktivierte Module" label_docs_access_token: Zugriffstoken + label_document_view_all: Alle Dokumente anzeigen label_emoji_support: Emoji Support label_enable_auto_refresh: Automatische Aktualisierung aktivieren label_enable_sidebar: Sidebar aktivieren @@ -116,6 +119,7 @@ de: label_issue_fast_description_edit: Schnellbearbeitung Beschreibung label_issue_freezed_with_close: Bearbeitung geschlossener Tickets verbieten (Freeze) label_issue_genitive: Tickets + label_issue_hide_max_attachments: Max. angezeigte Dateien label_issue_note_with_author: Ticket-Autor zu Kommentar anzeigen label_issue_status_change: "Wird \"Zugewiesen an\" nicht verändert und der Ticketstatus von x auf y geändert, dann wird das Ticket automatisch dem Ersteller zugewiesen" label_issue_timelog_required: Zeiterfassung für Ticket erforderlich @@ -209,6 +213,3 @@ de: top_wiki_help: Hier kannst Du Inhalte und Einstellungen bzg. der Wiki festlegen. wiki_pdf_remove_attachments_info: Wenn aktiv, werden die an der Wiki Seite angehängten Dateien nicht in der PDF Ansicht angezeigt. wiki_pdf_remove_title_info: Wenn aktiv, wird der Wiki Titel nicht in der PDF Ansicht angezeigt. - label_document_view_all: Alle Dokumente anzeigen - label_issue_hide_max_attachments: Max. angezeigte Dateien - info_issue_hide_max_attachments: Wird die hier angegebene Anzahl überschritten, werden alle Dateianhänge im Ticket eingeklappt/versteckt dargestellt. diff --git a/config/locales/en.yml b/config/locales/en.yml index 075c322c..eb30ab72 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -60,6 +60,7 @@ en: google_maps_embed_api_html: In case you want to use the Gmap macro in order to display Goole maps please implement your Google Maps API key here. Afterwards you can use the macro and various parameters. More information on how to use the parameters are provided at https://developers.google.com/maps/documentation/embed/guide. The Gmap macro works only in combination with the embedded key here. hidden_macros_in_toolbar_info: All available macros that the logged in user can use are listed via the macro button of the wiki toolbar. Macros marked here are not offered for selection. This allows you to limit the scope of the list. info_hidden_roles_html: Hidden roles can only be used together with the user visibility "Members of visible projects". If the user is not in a role that is visible to the current user, this role including user is hidden on the project overview page and in query lists. + info_issue_hide_max_attachments: If the number of files entered here is exceeding all file attachments of an issue are displayed hidden. info_live_search_result_restriction: "LiveSearch results are limited to %{value} entries. Try to filter your search a better way." label_account_login_bottom: "Text for login page" label_activate_quickstart: Activate quickstart @@ -71,6 +72,7 @@ en: label_additionals_message: Message label_all_projects: All projects label_app_menu: App menu + label_auto_watch_on_issue_assigned: Issues assigned to me label_change_is_private: Change private/non-private label_change_to_dashboard: "Switch to Dashboard" label_chart_color_schema: Charts color scheme @@ -93,6 +95,7 @@ en: label_disable_sidebar: Disable sidebar label_disabled_modules: "Disabled modules" label_docs_access_token: "Access token" + label_document_view_all: View all documents label_emoji_support: Emoji support label_enable_auto_refresh: Enable auto refresh label_enable_sidebar: Enable sidebar @@ -116,6 +119,7 @@ en: label_issue_fast_description_edit: Fast edit for description label_issue_freezed_with_close: Disallow editing of closed issues (Freeze) label_issue_genitive: issue + label_issue_hide_max_attachments: Show max. files label_issue_note_with_author: Show issue author with note label_issue_status_change: "If \"Assignee\" is unchanged and the issue status changed from x to y, than the author is assigned to the issue" label_issue_timelog_required: Time log for issues required @@ -209,6 +213,3 @@ en: top_wiki_help: "Here you can define contents and settings for your Wiki." wiki_pdf_remove_attachments_info: "When active the attached Wiki files will not be displayed in PDF view." wiki_pdf_remove_title_info: "When active the Wiki title info will not be displayed in PDF view." - label_document_view_all: View all documents - label_issue_hide_max_attachments: Show max. files - info_issue_hide_max_attachments: If the number of files entered here is exceeding all file attachments of an issue are displayed hidden. diff --git a/config/locales/es.yml b/config/locales/es.yml index 85037c79..7d79f92a 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -60,6 +60,7 @@ es: google_maps_embed_api_html: En caso de querer utilizar el macro Gmap para mostrar mapas de Google necesita ingresar su Clave de API de Google Maps aquí. Luego podrá utilizar el macro y varios parámetros. Mas información acerca de como utilizar estos parametros está disponible en https://developers.google.com/maps/documentation/embed/guide. El macro Gmap funciona solamente si se ingresa esta clave. hidden_macros_in_toolbar_info: Todas las macros disponibles que el usuario conectado puede utilizar se enumeran mediante el botón de macros de la barra de herramientas wiki. Las macros marcadas aquí no se ofrecen para la selección. Esto permite restringir el alcance de la lista. info_hidden_roles_html: Los roles ocultos sólo se pueden utilizar junto con la visibilidad del usuario "Miembros de proyectos visibles". Si el usuario no está en una función que sea visible para el usuario actual, esta función, que incluye al usuario, se oculta en la página de resumen del proyecto y en las listas de consulta. + info_issue_hide_max_attachments: "Si se sobrepasa el número de archivos introducidos aquí, todos los archivos adjuntos de una incidencia se muestran ocultos." info_live_search_result_restriction: "Los resultados de LiveSearch se limitan a %{value} golpes. Intente describir su búsqueda con más detalle." label_account_login_bottom: "Texto para la página de inicio de sesión" label_activate_quickstart: Activar quickstart @@ -71,6 +72,7 @@ es: label_additionals_message: "Mensaje" label_all_projects: Todos los proyectos label_app_menu: Menú de aplicación + label_auto_watch_on_issue_assigned: Issues assigned to me label_change_is_private: Cambiar privado/no-privado label_change_to_dashboard: "Cambiar a Dashboard" label_chart_color_schema: Charts color scheme @@ -93,6 +95,7 @@ es: label_disable_sidebar: "Deshabilitar la barra lateral" label_disabled_modules: "Módulos desactivados" label_docs_access_token: Token de acceso + label_document_view_all: "Todos los documentos" label_emoji_support: Emoji Soporta label_enable_auto_refresh: "Activar la actualización automática" label_enable_sidebar: "Activar la barra lateral" @@ -116,6 +119,7 @@ es: label_issue_fast_description_edit: "Edición rápida para la descripción" label_issue_freezed_with_close: No permitir editar peticiones cerradas (Congelar) label_issue_genitive: "problema" + label_issue_hide_max_attachments: "Mostrar archivos máx." label_issue_note_with_author: "Mostrar autor de tarea con nota" label_issue_status_change: "Si no se modifica el usuario \"Asignado\" y la el estado de la petición es modificado de x a y, entonces la petición es asignada al autor de la petición" label_issue_timelog_required: Se requiere Registro de tiempo para las peticiones @@ -209,6 +213,3 @@ es: top_wiki_help: "Aquí puede definir contenidos y configuracioens para su Wiki." wiki_pdf_remove_attachments_info: "Cuando está activa, los adjuntos no serán mostrados en los PDF." wiki_pdf_remove_title_info: "Cuando está activa, el título de la Wiki no será mostrado en los PDF." - label_document_view_all: "Todos los documentos" - label_issue_hide_max_attachments: "Mostrar archivos máx." - info_issue_hide_max_attachments: "Si se sobrepasa el número de archivos introducidos aquí, todos los archivos adjuntos de una incidencia se muestran ocultos." diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 5e479899..2eb488cc 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -60,6 +60,7 @@ fr: google_maps_embed_api_html: "Si vous souhaitez utiliser la macro Gmap pour afficher les cartes de Goole, veuillez implémenter votre clé API Google Maps ici. Ensuite, vous pouvez utiliser la macro et divers paramètres. Pour plus d'informations sur l'utilisation des paramètres, voir https://developers.google.com/maps/documentation/embed/guide. La macro Gmap ne fonctionne qu'en combinaison avec la clé intégrée." hidden_macros_in_toolbar_info: "Toutes les macros disponibles que l'utilisateur connecté peut utiliser sont listées via le bouton macro de la barre d'outils wiki. Les macros marquées ici ne sont pas proposées à la sélection. Ceci vous permet de limiter la portée de la liste." info_hidden_roles_html: "Les rôles cachés ne peuvent être utilisés qu'avec la visibilité utilisateur \"Membres de projets visibles\". Si l'utilisateur n'est pas dans un rôle visible par l'utilisateur actuel, ce rôle, y compris l'utilisateur, est masqué sur la page de synthèse du projet et dans les listes de requêtes." + info_issue_hide_max_attachments: "Si le nombre de fichiers saisis ici est supérieur, toutes les pièces jointes d'une question sont affichées de manière masquée." info_live_search_result_restriction: "Les résultats de LiveSearch sont limités à %{value} résultats limités. Essaie de décrire ta recherche plus précisément." label_account_login_bottom: "Texte pour la page de connexion" label_activate_quickstart: "Activer quickstart" @@ -71,6 +72,7 @@ fr: label_additionals_message: Message label_all_projects: Tous les projets label_app_menu: Menu applicatif + label_auto_watch_on_issue_assigned: Issues assigned to me label_change_is_private: Changer Privé/non privé label_change_to_dashboard: "Passer au tableau de bord" label_chart_color_schema: Schéma de couleur graphique @@ -93,6 +95,7 @@ fr: label_disable_sidebar: "Désactiver la sidebar" label_disabled_modules: "Modules désactivés" label_docs_access_token: Jeton d'accès + label_document_view_all: "Voir tous les documents" label_emoji_support: Emoji Support label_enable_auto_refresh: "Activer le rafraîchissement automatique" label_enable_sidebar: "Activer la sidebar" @@ -116,6 +119,7 @@ fr: label_issue_fast_description_edit: "Édition rapide pour la description" label_issue_freezed_with_close: "Interdire l'édition des tâches fermées (freeze)" label_issue_genitive: "problème" + label_issue_hide_max_attachments: "Afficher les fichiers max." label_issue_note_with_author: "Afficher l'auteur de la tâche avec une note" label_issue_status_change: "Si \"Assignee\" est inchangé et que le statut de la question est passé de x à y, l'auteur est assigné à la question." label_issue_timelog_required: Saisie de temps obligatoire pour une tâche @@ -209,6 +213,3 @@ fr: top_wiki_help: "Ici vous pouvez définir le contenu et les paramètres de votre Wiki." wiki_pdf_remove_attachments_info: "Lorsqu'ils sont actifs, les fichiers Wiki joints ne seront pas affichés en vue PDF." wiki_pdf_remove_title_info: "Lorsqu'elle est active, l'information sur le titre du wiki ne sera pas affichée dans la vue PDF." - label_document_view_all: "Voir tous les documents" - label_issue_hide_max_attachments: "Afficher les fichiers max." - info_issue_hide_max_attachments: "Si le nombre de fichiers saisis ici est supérieur, toutes les pièces jointes d'une question sont affichées de manière masquée." diff --git a/config/locales/it.yml b/config/locales/it.yml index f3cdf262..9dce4481 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -60,6 +60,7 @@ it: google_maps_embed_api_html: Se si desidera utilizzare la macro Gmap per visualizzare Google Maps, è necessario immettere qui la chiave API incorporata di Google Maps. Potete trovare maggiori informazioni sotto https://developers.google.com/maps/documentation/embed/guide hidden_macros_in_toolbar_info: "Tutte le macro disponibili che l'utente registrato può utilizzare sono elencate tramite il pulsante macro della barra degli strumenti del wiki. Le macro contrassegnate qui non vengono offerte per la selezione. In questo modo è possibile limitare la portata dell'elenco." info_hidden_roles_html: "I ruoli nascosti possono essere utilizzati solo insieme alla visibilità dell'utente \"Membri di progetti visibili\". Se l'utente non è in un ruolo visibile all'utente corrente, questo ruolo, incluso l'utente, è nascosto nella pagina di panoramica del progetto e nelle liste di ricerca." + info_issue_hide_max_attachments: "Se il numero di file inseriti in questa sezione è superiore a quello massimo, tutti gli allegati di un problema vengono visualizzati nascosti." info_live_search_result_restriction: "I risultati di LiveSearch sono limitati a %{value} colpi. Prova a descrivere la tua ricerca in modo più dettagliato." label_account_login_bottom: "Testo per la pagina di accesso" label_activate_quickstart: Attivare quickstart @@ -71,6 +72,7 @@ it: label_additionals_message: "Messaggio" label_all_projects: Tutti i progetti label_app_menu: App menu + label_auto_watch_on_issue_assigned: Issues assigned to me label_change_is_private: Change private/non-private label_change_to_dashboard: "Passa a Dashboard" label_chart_color_schema: "Schema di colori delle tabelle" @@ -93,6 +95,7 @@ it: label_disable_sidebar: "Disattivare la barra laterale" label_disabled_modules: "Disattivare modules" label_docs_access_token: Access token + label_document_view_all: "Vedi tutti i documenti" label_emoji_support: Emoji Supporto label_enable_auto_refresh: "Abilita l'aggiornamento automatico" label_enable_sidebar: "Attivare la barra laterale" @@ -116,6 +119,7 @@ it: label_issue_fast_description_edit: "Modifica rapida della descrizione" label_issue_freezed_with_close: "Impedire la modifica dei problemi chiusi (Freeze)" label_issue_genitive: tema + label_issue_hide_max_attachments: "Mostra file massimi" label_issue_note_with_author: "Mostra l'autore dell'attività con una nota" label_issue_status_change: "Se \"Assignee\" è invariato e lo stato della questione è cambiato da x a y, allora l'autore è assegnato alla questione" label_issue_timelog_required: "Time log per i problemi richiesti" @@ -209,6 +213,3 @@ it: top_wiki_help: "Qui puoi definire contenuti e impostazioni per il tuo Wiki." wiki_pdf_remove_attachments_info: "Quando è attivo, il Wiki file allegati non verranno visualizzati nella vista PDF." wiki_pdf_remove_title_info: "Quando è attivo, le informazioni sul titolo del Wiki non verranno visualizzate nella vista PDF." - label_document_view_all: "Vedi tutti i documenti" - label_issue_hide_max_attachments: "Mostra file massimi" - info_issue_hide_max_attachments: "Se il numero di file inseriti in questa sezione è superiore a quello massimo, tutti gli allegati di un problema vengono visualizzati nascosti." diff --git a/config/locales/ja.yml b/config/locales/ja.yml index c570f9eb..90c9cacc 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -60,6 +60,7 @@ ja: google_maps_embed_api_html: In case you want to use the Gmap macro in order to display Goole maps please implement your Google Maps API key here. Afterwards you can use the macro and various parameters. More information on how to use the parameters are provided at https://developers.google.com/maps/documentation/embed/guide. The Gmap macro works only in combination with the embedded key here. hidden_macros_in_toolbar_info: "ログインしているユーザーが使用できるすべての利用可能なマクロは、wikiツールバーのマクロボタンを使ってリストアップされています。ここでマークされたマクロは選択のために提供されていません。これにより、リストの範囲を制限することができます。" info_hidden_roles_html: Hidden roles can only be used together with the user visibility "Members of visible projects". If the user is not in a role that is visible to the current user, this role including user is hidden on the project overview page and in query lists. + info_issue_hide_max_attachments: "ここに入力したファイル数を超えると、issueの添付ファイルはすべて非表示になります。" info_live_search_result_restriction: "LiveSearchの検索結果は %{value} に限定されます。がヒットしました。検索内容をもっと詳しく説明してみてください。" label_account_login_bottom: "ログイン画面の文章" label_activate_quickstart: "アクティブ化 quickstart" @@ -71,6 +72,7 @@ ja: label_additionals_message: "メッセージ" label_all_projects: すべてのプロジェクト label_app_menu: App menu + label_auto_watch_on_issue_assigned: Issues assigned to me label_change_is_private: "プライベート/非プライベート変更" label_change_to_dashboard: "ダッシュボードに切り替える" label_chart_color_schema: Charts color scheme @@ -93,6 +95,7 @@ ja: label_disable_sidebar: "サイドバーを無効にする" label_disabled_modules: "無効化したいモジュール" label_docs_access_token: Access token + label_document_view_all: "すべての資料を見る" label_emoji_support: Emoji 対応 label_enable_auto_refresh: "オートリフレシュを行う" label_enable_sidebar: "サイドバーを有効にする" @@ -116,6 +119,7 @@ ja: label_issue_fast_description_edit: "描写のための高速編集" label_issue_freezed_with_close: Disallow editing of closed issues (Freeze) label_issue_genitive: "タスク" + label_issue_hide_max_attachments: "最大ファイル数を表示" label_issue_note_with_author: "タスクの作者とメモを表示する" label_issue_status_change: "If \"Assignee\" is unchanged and the issue status changed from x to y, than the author is assigned to the issue" label_issue_timelog_required: "タスクに必要な時間予約" @@ -209,6 +213,3 @@ ja: top_wiki_help: "ここでは、Wikiの内容や設定を定義することができます。" wiki_pdf_remove_attachments_info: "アクティブな場合、添付されたWikiファイルはPDFビューに表示されません。" wiki_pdf_remove_title_info: "アクティブな場合、Wikiのタイトル情報はPDFビューに表示されません。" - label_document_view_all: "すべての資料を見る" - label_issue_hide_max_attachments: "最大ファイル数を表示" - info_issue_hide_max_attachments: "ここに入力したファイル数を超えると、issueの添付ファイルはすべて非表示になります。" diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 8c617d42..338b9b06 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -60,6 +60,7 @@ ko: google_maps_embed_api_html: 'Goole지도를 표시하기 위해 Gmap 매크로를 사용하려는 경우 여기에 Google Maps API 키를 구현하십시오. 그 후 매크로 및 다양한 매개 변수를 사용할 수 있습니다. 매개 변수를 사용하는 방법에 대한 자세한 내용은 https://developers.google.com/maps/documentation/embed/guide. Gmap 매크로는 여기에 포함 된 키와 조합해서 만 작동합니다.' hidden_macros_in_toolbar_info: 로그인 한 사용자가 사용할 수있는 모든 매크로가 위키 도구 모음의 매크로 버튼을 통해 나열됩니다. 여기에 표시된 매크로는 선택할 수 없습니다. 이를 통해 목록의 범위를 제한 할 수 있습니다. info_hidden_roles_html: Hidden roles can only be used together with the user visibility "Members of visible projects". 사용자가 현재 사용자에게 보이는 역할이 아닌 경우 사용자를 포함한이 역할은 프로젝트 개요 페이지와 쿼리 목록에서 숨겨집니다. + info_issue_hide_max_attachments: "여기에 입력한 파일 수를 초과하는 경우 이슈의 모든 첨부 파일이 숨겨져 표시됩니다." info_live_search_result_restriction: "LiveSearch results are limited to %{value} Matches. Try to describe your search in more detail." label_account_login_bottom: "로그인 페이지의 텍스트" label_activate_quickstart: "활성화 quickstart" @@ -71,6 +72,7 @@ ko: label_additionals_message: "메시지" label_all_projects: 모든 프로젝트 label_app_menu: 앱 메뉴 + label_auto_watch_on_issue_assigned: Issues assigned to me label_change_is_private: 개인 / 비 개인 변경 label_change_to_dashboard: "대시보드로 전환" label_chart_color_schema: 차트 색 구성표 @@ -93,6 +95,7 @@ ko: label_disable_sidebar: "사이드바 비활성화" label_disabled_modules: "비활성화 된 모듈" label_docs_access_token: Access token + label_document_view_all: "모든 문서 보기" label_emoji_support: Emoji support label_enable_auto_refresh: "자동 새로고침 활성화 " label_enable_sidebar: "사이드바 활성화" @@ -116,6 +119,7 @@ ko: label_issue_fast_description_edit: "빠른 설명 편집" label_issue_freezed_with_close: 닫힌 이슈 편집 금지 (고정) label_issue_genitive: "일" + label_issue_hide_max_attachments: "최대 파일 수 표시" label_issue_note_with_author: "메모와 함께 작업 작성자 표시" label_issue_status_change: "If \"Assignee\" is unchanged and the issue status changed from x to y, than the author is assigned to the issue" label_issue_timelog_required: 필요한 문제에 대한 시간 로그 @@ -209,6 +213,3 @@ ko: top_wiki_help: 여기에서 위키의 내용과 설정을 정의 할 수 있습니다. wiki_pdf_remove_attachments_info: 활성화 된 경우 첨부 된 Wiki 파일은 PDF보기에 표시되지 않습니다. wiki_pdf_remove_title_info: 활성화되면 위키 제목 정보가 PDF보기에 표시되지 않습니다. - label_document_view_all: "모든 문서 보기" - label_issue_hide_max_attachments: "최대 파일 수 표시" - info_issue_hide_max_attachments: "여기에 입력한 파일 수를 초과하는 경우 이슈의 모든 첨부 파일이 숨겨져 표시됩니다." diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 6ab94540..2fffe435 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -60,6 +60,7 @@ pl: google_maps_embed_api_html: "W przypadku, gdy chcesz użyć makra Gmapy do wyświetlania map Google, zaimplementuj tutaj swój klucz API Google Maps. Następnie możesz użyć makra i różnych parametrów. Więcej informacji na temat korzystania z parameterów znajduje się na stronie https://developers.google.com/maps/documentation/embed/guide. The Gmap macro works only in combination with the embedded key here." hidden_macros_in_toolbar_info: "Wszystkie dostępne makra, których może używać zalogowany użytkownik, są wymienione za pomocą przycisku makro na pasku narzędzi wiki. Makra zaznaczone tutaj nie są oferowane do wyboru. Pozwala to na ograniczenie zakresu listy." info_hidden_roles_html: Hidden roles can only be used together with the user visibility "Members of visible projects". Jeśli użytkownik nie jest w roli, która jest widoczna dla bieżącego użytkownika, rola ta wraz z użytkownikiem jest ukryta na stronie przeglądu projektu i na listach zapytań. + info_issue_hide_max_attachments: "Jeśli liczba plików wprowadzonych w tym miejscu zostanie przekroczona, wszystkie załączniki do sprawy zostaną wyświetlone jako ukryte." info_live_search_result_restriction: "Wyniki LiveSearch są ograniczone do %{value} trafienia. Spróbuj opisać swoje poszukiwania bardziej szczegółowo." label_account_login_bottom: "Tekst dla strony logowania" label_activate_quickstart: "Aktywuj quickstart" @@ -71,6 +72,7 @@ pl: label_additionals_message: "Komunikat" label_all_projects: Wszystkie projekty label_app_menu: App menu + label_auto_watch_on_issue_assigned: Issues assigned to me label_change_is_private: "Zmień prywatny / prywatny / nieprywatny" label_change_to_dashboard: "Przełącz się na tablicę rozdzielczą" label_chart_color_schema: Charts color scheme @@ -93,6 +95,7 @@ pl: label_disable_sidebar: "Wyłączyć pasek boczny" label_disabled_modules: "Moduły wyłączone" label_docs_access_token: Access token + label_document_view_all: "Zobacz wszystkie dokumenty" label_emoji_support: Emoji Obsługa label_enable_auto_refresh: "Włącz autoodświeżanie" label_enable_sidebar: "Włącz pasek boczny" @@ -116,6 +119,7 @@ pl: label_issue_fast_description_edit: "Szybka edycja do opisu" label_issue_freezed_with_close: "Uniemożliwienie edycji zamkniętych issues (Freeze)" label_issue_genitive: issue + label_issue_hide_max_attachments: "Pokaż maksymalną liczbę plików" label_issue_note_with_author: "Pokaż autora zadania z notatką" label_issue_status_change: "Jeśli status \"Assignee\" jest niezmieniony, a status sprawy zmienił się z x na y, to autor jest przypisany do sprawy" label_issue_timelog_required: "Wymagany jest dziennik czasowy dla issues" @@ -209,6 +213,3 @@ pl: top_wiki_help: "Tutaj możesz zdefiniować zawartość i ustawienia dla swojej Wiki." wiki_pdf_remove_attachments_info: "Gdy jest aktywny, załączone pliki Wiki nie będą wyświetlane w widoku PDF." wiki_pdf_remove_title_info: "Gdy jest aktywny, informacja o tytule Wiki nie będzie wyświetlana w widoku PDF." - label_document_view_all: "Zobacz wszystkie dokumenty" - label_issue_hide_max_attachments: "Pokaż maksymalną liczbę plików" - info_issue_hide_max_attachments: "Jeśli liczba plików wprowadzonych w tym miejscu zostanie przekroczona, wszystkie załączniki do sprawy zostaną wyświetlone jako ukryte." diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 5afe5b89..1ef9b857 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -60,6 +60,7 @@ pt-BR: google_maps_embed_api_html: "Caso você queira usar a macro Gmap para exibir os mapas Goole, por favor, implemente sua chave API do Google Maps aqui. Em seguida, você pode usar a macro e vários parâmetros. Mais informações sobre como usar os parameters são fornecidas em https://developers.google.com/maps/documentation/embed/guide. A macro Gmap funciona apenas em combinação com a chave embutida aqui." hidden_macros_in_toolbar_info: "Todas as macros disponíveis que o usuário logado pode usar são listadas através do botão de macro da barra de ferramentas do wiki. As macros aqui marcadas não são oferecidas para seleção. Isto permite limitar o escopo da lista." info_hidden_roles_html: "As funções ocultas só podem ser usadas junto com a visibilidade do usuário \"Members of visible projects\". Se o usuário não estiver em uma função que seja visível para o usuário atual, esta função, incluindo o usuário, está oculta na página de síntese do projeto e nas listas de consulta." + info_issue_hide_max_attachments: "Se o número de arquivos inserido aqui for excedido, todos os anexos de arquivos de um problema serão exibidos ocultos." info_live_search_result_restriction: "Os resultados do LiveSearch são limitados a %{value}. acertos. Tente descrever sua busca com mais detalhes." label_account_login_bottom: "Texto para página de login" label_activate_quickstart: "Ativar quickstart" @@ -71,6 +72,7 @@ pt-BR: label_additionals_message: "Mensagem" label_all_projects: Todos os Projekte label_app_menu: App menu + label_auto_watch_on_issue_assigned: Issues assigned to me label_change_is_private: "Mudança privada/não-privada" label_change_to_dashboard: "Mude para Dashboard" label_chart_color_schema: "Esquema de cores dos gráficos" @@ -93,6 +95,7 @@ pt-BR: label_disable_sidebar: "Desativar sidebar" label_disabled_modules: "Desativar módulos" label_docs_access_token: Access token + label_document_view_all: "Veja todos os documentos" label_emoji_support: Emoji Apoio label_enable_auto_refresh: "Habilitar o auto refresh" label_enable_sidebar: "Habilitar barra lateral" @@ -116,6 +119,7 @@ pt-BR: label_issue_fast_description_edit: "Edição rápida para descrição" label_issue_freezed_with_close: "Proibir a edição de tarefas fechadas (Congelamento)" label_issue_genitive: "Tarefa" + label_issue_hide_max_attachments: "Mostrar número máximo de arquivos" label_issue_note_with_author: "Mostrar autor da tarefa com nota" label_issue_status_change: "Se \"Assignee\" é inalterado e o status da tarefa mudou de x para y, do que o autor é designado para a tarefa" label_issue_timelog_required: "Registro de tempo para as tarefas necessárias" @@ -209,6 +213,3 @@ pt-BR: top_wiki_help: "Aqui você pode definir conteúdos e configurações para seu Wiki." wiki_pdf_remove_attachments_info: "Quando ativo, os arquivos Wiki anexos não serão exibidos na visualização em PDF." wiki_pdf_remove_title_info: "Quando ativo, o título do Wiki não será exibido na visualização em PDF." - label_document_view_all: "Veja todos os documentos" - label_issue_hide_max_attachments: "Mostrar número máximo de arquivos" - info_issue_hide_max_attachments: "Se o número de arquivos inserido aqui for excedido, todos os anexos de arquivos de um problema serão exibidos ocultos." diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 04185275..a82d7127 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -60,6 +60,7 @@ ru: google_maps_embed_api_html: In case you want to use the Gmap macro in order to display Goole maps please implement your Google Maps API key here. Afterwards you can use the macro and various parameters. More information on how to use the parameters are provided at https://developers.google.com/maps/documentation/embed/guide. The Gmap macro works only in combination with the embedded key here. hidden_macros_in_toolbar_info: "Все доступные макросы, которые может использовать вошедший в систему пользователь, перечислены с помощью кнопки макроса на панели инструментов вики. Макросы, отмеченные здесь, не предлагаются для выбора. Это позволяет вам ограничить область действия списка." info_hidden_roles_html: "Скрытые роли могут использоваться только вместе с видимостью пользователя \"Members of visible projects\". Если пользователь не находится в роли, видимой для текущего пользователя, эта роль, включая пользователя, скрыта на странице обзора проекта и в списках запросов." + info_issue_hide_max_attachments: "При превышении введенного здесь количества файлов все прикрепленные к заданию файлы отображаются скрытыми." info_live_search_result_restriction: "Результаты LiveSearch ограничены %{value} удары. Попробуйте описать свой поиск более подробно." label_account_login_bottom: "Текст страницы входа в систему" label_activate_quickstart: "Активировать быстрый старт" @@ -71,6 +72,7 @@ ru: label_additionals_message: "Сообщение" label_all_projects: Все проекты label_app_menu: App menu + label_auto_watch_on_issue_assigned: Issues assigned to me label_change_is_private: "Изменение частного / не-частного" label_change_to_dashboard: "Переключиться на приборную панель" label_chart_color_schema: Charts color scheme @@ -93,6 +95,7 @@ ru: label_disable_sidebar: "отключить боковую панель" label_disabled_modules: "Отключенные модули" label_docs_access_token: "Токен доступа" + label_document_view_all: "Посмотреть все документы" label_emoji_support: Emoji Поддержка label_enable_auto_refresh: "Включить автообновление" label_enable_sidebar: "Включить боковую панель" @@ -116,6 +119,7 @@ ru: label_issue_fast_description_edit: "Быстрая правка для описания" label_issue_freezed_with_close: "Запрет редактирования закрытых заданий (Freeze)" label_issue_genitive: "Задание" + label_issue_hide_max_attachments: "Показать максимальное количество файлов" label_issue_note_with_author: "Показать автора задачи с примечанием" label_issue_status_change: "If \"Assignee\" is unchanged and the issue status changed from x to y, than the author is assigned to the issue" label_issue_timelog_required: "Бронирование времени, необходимого для выполнения задания" @@ -209,6 +213,3 @@ ru: top_wiki_help: "Здесь вы можете определить содержимое и настройки для вашей Вики." wiki_pdf_remove_attachments_info: "Если флажок установлен, вложенные Вики-файлы не будут отображаться в PDF-формате." wiki_pdf_remove_title_info: "При активации этого параметра информация о названии Вики не будет отображаться в PDF-формате." - label_document_view_all: "Посмотреть все документы" - label_issue_hide_max_attachments: "Показать максимальное количество файлов" - info_issue_hide_max_attachments: "При превышении введенного здесь количества файлов все прикрепленные к заданию файлы отображаются скрытыми." diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 7486b26b..c0d4ab86 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -60,6 +60,7 @@ google_maps_embed_api_html: In case you want to use the Gmap macro in order to display Goole maps please implement your Google Maps API key here. Afterwards you can use the macro and various parameters. More information on how to use the parameters are provided at https://developers.google.com/maps/documentation/embed/guide. The Gmap macro works only in combination with the embedded key here. hidden_macros_in_toolbar_info: All available macros that the logged in user can use are listed via the macro button of the wiki toolbar. Macros marked here are not offered for selection. This allows you to limit the scope of the list. info_hidden_roles_html: Hidden roles can only be used together with the user visibility "Members of visible projects". If the user is not in a role that is visible to the current user, this role including user is hidden on the project overview page and in query lists. + info_issue_hide_max_attachments: "如果超过此处输入的文件数量,则会隐藏显示问题的所有文件附件。" info_live_search_result_restriction: "LiveSearch的结果仅限于 %{value}。命中率。尝试更详细地描述你的搜索。" label_account_login_bottom: "登入頁文字" label_activate_quickstart: Activate quickstart @@ -71,6 +72,7 @@ label_additionals_message: "讯息" label_all_projects: 所有项目 label_app_menu: App 選單 + label_auto_watch_on_issue_assigned: Issues assigned to me label_change_is_private: 改变私人/非私人 label_change_to_dashboard: "Switch to Dashboard" label_chart_color_schema: Charts color scheme @@ -93,6 +95,7 @@ label_disable_sidebar: Disable sidebar label_disabled_modules: "禁用模組" label_docs_access_token: Access token + label_document_view_all: "查看所有文件" label_emoji_support: Emoji support label_enable_auto_refresh: "启用自动刷新" label_enable_sidebar: Enable sidebar @@ -116,6 +119,7 @@ label_issue_fast_description_edit: "快速编辑描述" label_issue_freezed_with_close: Disallow editing of closed issues (Freeze) label_issue_genitive: "问题" + label_issue_hide_max_attachments: "显示最大文件数" label_issue_note_with_author: "显示任务的作者与注释" label_issue_status_change: "若未修改 \"被分派者\" ,且議題狀態要從 X 變更為 Y ,則該議題必須被分派給議題作者。" label_issue_timelog_required: "所需问题的时间记录" @@ -209,6 +213,3 @@ top_wiki_help: "您可以在此自訂Wiki的內容和設定。" wiki_pdf_remove_attachments_info: "當啟用時,Wiki附件將不會顯示在PDF中。" wiki_pdf_remove_title_info: "當啟用時,Wiki標題訊息不會顯示在PDF中" - label_document_view_all: "查看所有文件" - label_issue_hide_max_attachments: "显示最大文件数" - info_issue_hide_max_attachments: "如果超过此处输入的文件数量,则会隐藏显示问题的所有文件附件。" diff --git a/config/locales/zh.yml b/config/locales/zh.yml index b551c8da..c5c2a79c 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -60,6 +60,7 @@ zh: google_maps_embed_api_html: 如果你想使用 Gmap 宏以现实 Google 地图,请在此处使用你的 Google 地图 API Key。之后你就可以使用宏和多种参数。关于如何使用参数的更多信息请查看 https://developers.google.com/maps/documentation/embed/guide. Gmap 宏只有在此处提供 Key 的情况下才可用。 hidden_macros_in_toolbar_info: 登录用户可以使用的所有可用宏都可通过 Wiki 页面工具栏 的 宏 按钮列出。请在此处选择不希望列出的宏。 info_hidden_roles_html: 隐藏功能只能与"用户可见度"选项一起使用。如果某用户不在对当前用户可见的角色,则此用户及其角色在项目概述页和查询列表中将对当前用户隐藏。 + info_issue_hide_max_attachments: "如果超过此处输入的文件数量,则会隐藏显示问题的所有文件附件。" info_live_search_result_restriction: "LiveSearch的结果仅限于 %{value}。命中率。尝试更详细地描述你的搜索。" label_account_login_bottom: "用于登陆页的文本" label_activate_quickstart: Activate quickstart @@ -71,6 +72,7 @@ zh: label_additionals_message: "讯息" label_all_projects: 所有项目 label_app_menu: 应用菜单 + label_auto_watch_on_issue_assigned: Issues assigned to me label_change_is_private: 修改私有/非私有 label_change_to_dashboard: "切换到仪表盘" label_chart_color_schema: 图表配色主题 @@ -93,6 +95,7 @@ zh: label_disable_sidebar: 禁用侧边栏 label_disabled_modules: "禁用模块" label_docs_access_token: 访问令牌 + label_document_view_all: "查看所有文件" label_emoji_support: Emoji support label_enable_auto_refresh: "启用自动刷新" label_enable_sidebar: 启用侧边栏 @@ -116,6 +119,7 @@ zh: label_issue_fast_description_edit: "快速编辑描述" label_issue_freezed_with_close: 禁止修改已关闭的问题 (冻结) label_issue_genitive: "问题" + label_issue_hide_max_attachments: "显示最大文件数" label_issue_note_with_author: "显示任务的作者与注释" label_issue_status_change: "若 \"指派给\" 的值未修改,且问题状态要从 X 变更为 Y,那么该问题必须指派给问题作者自己。" label_issue_timelog_required: 问题需要登记工时 @@ -209,6 +213,3 @@ zh: top_wiki_help: 您可以在此定义 Wiki 的内容及设置。 wiki_pdf_remove_attachments_info: 当启用时,Wiki 附件将不会显示在 PDF 视图中。 wiki_pdf_remove_title_info: 当启用时,Wiki 标题信息将不会显示在 PDF 视图中。 - label_document_view_all: "查看所有文件" - label_issue_hide_max_attachments: "显示最大文件数" - info_issue_hide_max_attachments: "如果超过此处输入的文件数量,则会隐藏显示问题的所有文件附件。" diff --git a/lib/additionals/patches/issue_patch.rb b/lib/additionals/patches/issue_patch.rb index 6ec37fe1..045122da 100644 --- a/lib/additionals/patches/issue_patch.rb +++ b/lib/additionals/patches/issue_patch.rb @@ -15,6 +15,8 @@ module Additionals before_validation :auto_assigned_to before_save :change_status_with_assigned_to_change + after_commit :add_assigned_watcher + safe_attributes 'author_id', if: proc { |issue, user| issue.new_record? && user.allowed_to?(:change_new_issue_author, issue.project) || @@ -43,6 +45,15 @@ module Additionals end module InstanceMethods + def add_assigned_watcher + return unless assigned_to_id + return unless author.pref.auto_watch_on? 'issue_assigned' + return if watcher_user_ids.include? assigned_to_id + return unless assigned_to.active? + + set_watcher assigned_to, true + end + def sidbar_change_status_allowed_to(user, new_status_id = nil) statuses = new_statuses_allowed_to user if new_status_id.present? diff --git a/lib/additionals/patches/user_preference_patch.rb b/lib/additionals/patches/user_preference_patch.rb index e5b569cb..0e1086db 100644 --- a/lib/additionals/patches/user_preference_patch.rb +++ b/lib/additionals/patches/user_preference_patch.rb @@ -8,6 +8,8 @@ module Additionals included do include InstanceMethods safe_attributes 'recently_used_dashboards' + + UserPreference::AUTO_WATCH_ON_OPTIONS << 'issue_assigned' end module InstanceMethods diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 1861b688..994afcfa 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -166,4 +166,15 @@ class IssueTest < Additionals::TestCase assert_nil issue.assigned_to_id end end + + def test_assigned_to_should_add_watcher + user = User.first + user.pref.auto_watch_on = ['issue_assigned'] + user.pref.save + issue = Issue.new author_id: user.id, project_id: 1, tracker_id: 1, assigned_to_id: user.id, subject: 'test_assigned_should_add_watcher' + + assert_difference 'Watcher.count', 1 do + assert_save issue + end + end end