Project

General

Profile

Patch #1997 » watcher_personnel_queryFilter.patch

Patch vs trunk rev.1927 (app/models/query.rb + lang/) - Mariusz Olejnik, 2008-10-07 00:49

View differences:

app/models/query.rb (working copy)
end
@available_filters["assigned_to_id"] = { :type => :list_optional, :order => 4, :values => user_values } unless user_values.empty?
@available_filters["author_id"] = { :type => :list, :order => 5, :values => user_values } unless user_values.empty?
@available_filters["vf_watcher"] = { :type => :list, :order => 6, :values => user_values } unless user_values.empty?
@available_filters["vf_personnel"] = { :type => :list, :order => 7, :values => user_values } unless user_values.empty?
if project
# project specific filters
unless @project.issue_categories.empty?
@available_filters["category_id"] = { :type => :list_optional, :order => 6, :values => @project.issue_categories.collect{|s| [s.name, s.id.to_s] } }
@available_filters["category_id"] = { :type => :list_optional, :order => 8, :values => @project.issue_categories.collect{|s| [s.name, s.id.to_s] } }
end
unless @project.versions.empty?
@available_filters["fixed_version_id"] = { :type => :list_optional, :order => 7, :values => @project.versions.sort.collect{|s| [s.name, s.id.to_s] } }
@available_filters["fixed_version_id"] = { :type => :list_optional, :order => 9, :values => @project.versions.sort.collect{|s| [s.name, s.id.to_s] } }
end
unless @project.active_children.empty?
@available_filters["subproject_id"] = { :type => :list_subprojects, :order => 13, :values => @project.active_children.collect{|s| [s.name, s.id.to_s] } }
@available_filters["subproject_id"] = { :type => :list_subprojects, :order => 15, :values => @project.active_children.collect{|s| [s.name, s.id.to_s] } }
end
add_custom_fields_filters(@project.all_issue_custom_fields)
else
......
db_field = 'value'
is_custom_filter = true
sql << "#{Issue.table_name}.id IN (SELECT #{Issue.table_name}.id FROM #{Issue.table_name} LEFT OUTER JOIN #{db_table} ON #{db_table}.customized_type='Issue' AND #{db_table}.customized_id=#{Issue.table_name}.id AND #{db_table}.custom_field_id=#{$1} WHERE "
elsif field == "vf_watcher"
db_table = Watcher.table_name
db_field = 'user_id'
sql << "#{Issue.table_name}.id IN (SELECT #{db_table}.watchable_id FROM #{db_table} WHERE #{db_table}.watchable_type='Issue' AND "
elsif field == "vf_personnel"
db_table = "ci"
db_field = 'user_id'
sql << "#{Issue.table_name}.id IN (SELECT distinct id from ( SELECT watchable_id id, user_id FROM #{Watcher.table_name} WHERE watchable_type='Issue' union select id, assigned_to_id from #{Issue.table_name} union select id, author_id from #{Issue.table_name} ) ci WHERE "
else
# regular field
db_table = Issue.table_name
......
end
# "me" value subsitution
if %w(assigned_to_id author_id).include?(field)
if %w(assigned_to_id author_id vf_watcher vf_personnel).include?(field)
v.push(User.current.logged? ? User.current.id.to_s : "0") if v.delete("me")
end
lang/bg.yml (working copy)
notice_unable_delete_version: Unable to delete version
label_renamed: renamed
label_copied: copied
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/ca.yml (working copy)
enumeration_issue_priorities: Prioritat dels assumptes
enumeration_doc_categories: Categories del document
enumeration_activities: Activitats (seguidor de temps)
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/cs.yml (working copy)
notice_unable_delete_version: Unable to delete version
label_renamed: renamed
label_copied: copied
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/da.yml (working copy)
enumeration_issue_priorities: Sagsprioriteter
enumeration_doc_categories: Dokumentkategorier
enumeration_activities: Aktiviteter (tidsregistrering)
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/de.yml (working copy)
enumeration_issue_priorities: Ticket-Prioritäten
enumeration_doc_categories: Dokumentenkategorien
enumeration_activities: Aktivitäten (Zeiterfassung)
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/en.yml (working copy)
enumeration_issue_priorities: Issue priorities
enumeration_doc_categories: Document categories
enumeration_activities: Activities (time tracking)
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/es.yml (working copy)
notice_unable_delete_version: Unable to delete version
label_renamed: renamed
label_copied: copied
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/fi.yml (working copy)
notice_unable_delete_version: Unable to delete version
label_renamed: renamed
label_copied: copied
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/fr.yml (working copy)
enumeration_doc_categories: Catégories des documents
enumeration_activities: Activités (suivi du temps)
notice_unable_delete_version: Unable to delete version
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/he.yml (working copy)
notice_unable_delete_version: Unable to delete version
label_renamed: renamed
label_copied: copied
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/hu.yml (working copy)
notice_unable_delete_version: A verziót nem lehet törölni
label_renamed: átnevezve
label_copied: lemásolva
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/it.yml (working copy)
notice_unable_delete_version: Impossibile cancellare la versione
label_renamed: rinominato
label_copied: copiato
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/ja.yml (working copy)
notice_unable_delete_version: Unable to delete version
label_renamed: renamed
label_copied: copied
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/ko.yml (working copy)
notice_unable_delete_version: 삭제 할 수 없는 버전 입니다.
label_renamed: renamed
label_copied: copied
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/lt.yml (working copy)
notice_unable_delete_version: Neimanoma panaikinti versiją
label_renamed: pervardintas
label_copied: nukopijuotas
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/nl.yml (working copy)
notice_unable_delete_version: Onmogelijk om deze versie te verwijderen.
label_renamed: hernoemt
label_copied: gekopieerd
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/no.yml (working copy)
notice_unable_delete_version: Unable to delete version
label_renamed: renamed
label_copied: copied
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/pl.yml (working copy)
# Keep this line to avoid problems with Windows Notepad UTF-8 (EF BB BF) idea...
# PL translation by Mariusz@Olejnik.net,
# Best regards from Lublin@Poland :-)
_gloc_rule_default: '|n| n==1 ? "" : "_plural" '
actionview_datehelper_select_day_prefix:
......
general_lang_name: 'Polski'
general_csv_separator: ','
general_csv_decimal_separator: '.'
general_csv_encoding: ISO-8859-2
general_pdf_encoding: ISO-8859-2
general_csv_encoding: UTF-8
general_pdf_encoding: UTF-8
general_day_names: Poniedziałek,Wtorek,Środa,Czwartek,Piątek,Sobota,Niedziela
general_first_day_of_week: '1'
......
notice_can_t_change_password: To konto ma zewnętrzne źródło identyfikacji. Nie możesz zmienić hasła.
notice_account_lost_email_sent: Email z instrukcjami zmiany hasła został wysłany do Ciebie.
notice_account_activated: Twoje konto zostało aktywowane. Możesz się zalogować.
notice_successful_create: Udane stworzenie.
notice_successful_update: Udane poprawienie.
notice_successful_delete: Udane usunięcie.
notice_successful_create: Utworzenie zakończone sukcesem.
notice_successful_update: Uaktualnienie zakończone sukcesem.
notice_successful_delete: Usunięcie zakończone sukcesem.
notice_successful_connection: Udane nawiązanie połączenia.
notice_file_not_found: Strona do której próbujesz się dostać nie istnieje lub została usunięta.
notice_locking_conflict: Dane poprawione przez innego użytkownika.
......
label_query_new: Nowe zapytanie
label_filter_add: Dodaj filtr
label_filter_plural: Filtry
label_equals: jest
label_not_equals: nie jest
label_in_less_than: w mniejszych od
label_in_more_than: w większych niż
label_equals: równa się
label_not_equals: różni się
label_in_less_than: mniejsze niż
label_in_more_than: większe niż
label_in: w
label_today: dzisiaj
label_less_than_ago: dni mniej
......
label_sort_lower: Do dołu
label_sort_lowest: Przesuń na dół
label_roadmap: Mapa
label_roadmap_due_in: W czasie %s
label_roadmap_due_in: W czasie
label_roadmap_no_issues: Brak zagadnień do tej wersji
label_search: Szukaj
label_result_plural: Rezultatów
......
label_overall_activity: Ogólna aktywność
setting_default_projects_public: Nowe projekty są domyślnie publiczne
error_scm_annotate: "Wpis nie istnieje lub nie można do niego dodawać adnotacji."
label_planning: Planning
text_subprojects_destroy_warning: 'Its subproject(s): %s will be also deleted.'
label_and_its_subprojects: %s and its subprojects
mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d days:"
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
setting_enabled_scm: Enabled SCM
text_enumeration_category_reassign_to: 'Reassign them to this value:'
text_enumeration_destroy_question: '%d objects are assigned to this value.'
label_incoming_emails: Incoming emails
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
field_parent_title: Parent page
label_issue_watchers: Watchers
setting_commit_logs_encoding: Commit messages encoding
button_quote: Quote
setting_sequential_project_identifiers: Generate sequential project identifiers
notice_unable_delete_version: Unable to delete version
label_renamed: renamed
label_copied: copied
label_planning: Planowanie
text_subprojects_destroy_warning: 'Podprojekt(y): %s zostaną także usunięte.'
label_and_its_subprojects: %s i podprojekty
mail_body_reminder: "Wykaz przypisanych do Ciebie zagadnień, których termin wypada w ciągu następnych %d dni"
mail_subject_reminder: "Uwaga na terminy, masz zagadnienia do obsłużenia w ciągu następnych %d dni!"
text_user_wrote: '%s napisał:'
label_duplicated_by: zdublikowane przez
setting_enabled_scm: Dostępny SCM
text_enumeration_category_reassign_to: 'Zmień przypisanie na tą wartość:'
text_enumeration_destroy_question: '%d obiektów jest przypisana do tej wartości.'
label_incoming_emails: Przygodząca poczta elektroniczna
label_generate_key: Wygeneruj klucz
setting_mail_handler_api_enabled: Uaktywnij usługi sieciowe (WebServices) dla poczty przychodzącej
setting_mail_handler_api_key: Klucz API
text_email_delivery_not_configured: "Dostarczanie poczty elektronicznej nie zostało skonfigurowane, więc powiadamianie jest nieaktywne.\nSkonfiguruj serwer SMTP w config/email.yml a następnie zrestartuj aplikację i uaktywnij to."
field_parent_title: Strona rodzica
label_issue_watchers: Obserwatorzy
setting_commit_logs_encoding: Zatwierdź kodowanie wiadomości
button_quote: Cytuj
setting_sequential_project_identifiers: Generuj sekwencyjne identyfikatory projektów
notice_unable_delete_version: Nie można usunąć wersji
label_renamed: przemianowano
label_copied: skopiowano
field_vf_watcher: Obserwator
field_vf_personnel: Personel
lang/pt-br.yml (working copy)
notice_unable_delete_version: Não foi possível excluir a versão
label_renamed: renomeado
label_copied: copiado
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/pt.yml (working copy)
enumeration_issue_priorities: Prioridade de tarefas
enumeration_doc_categories: Categorias de documentos
enumeration_activities: Actividades (Contagem de tempo)
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/ro.yml (working copy)
notice_unable_delete_version: Unable to delete version
label_renamed: renamed
label_copied: copied
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/ru.yml (working copy)
text_user_wrote: '%s написал(а):'
text_wiki_destroy_confirmation: Вы уверены, что хотите удалить данную Wiki и все содержимое?
text_workflow_edit: Выберите роль и трекер для редактирования последовательности состояний
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/sr.yml (working copy)
notice_unable_delete_version: Unable to delete version
label_renamed: renamed
label_copied: copied
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/sv.yml (working copy)
notice_unable_delete_version: Unable to delete version
label_renamed: renamed
label_copied: copied
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/th.yml (working copy)
notice_unable_delete_version: Unable to delete version
label_renamed: renamed
label_copied: copied
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/tr.yml (working copy)
notice_unable_delete_version: Unable to delete version
label_renamed: renamed
label_copied: copied
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/uk.yml (working copy)
notice_unable_delete_version: Unable to delete version
label_renamed: renamed
label_copied: copied
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/zh-tw.yml (working copy)
enumeration_issue_priorities: 項目優先權
enumeration_doc_categories: 文件分類
enumeration_activities: 活動 (時間追蹤)
field_vf_watcher: Watcher
field_vf_personnel: Personnel
lang/zh.yml (working copy)
enumeration_issue_priorities: 问题优先级
enumeration_doc_categories: 文档类别
enumeration_activities: 活动(时间跟踪)
field_vf_watcher: Watcher
field_vf_personnel: Personnel
(1-1/3)