1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-03-11 11:43:08 +00:00

Merge branch 'master' of git://github.com/edavis9/redmine

Conflicts:
	app/models/change.rb
	db/migrate/20100705164950_change_changes_path_length_limit.rb
This commit is contained in:
Holger Just 2010-07-27 12:40:30 +02:00
commit e275adfd54
37 changed files with 324 additions and 127 deletions

View File

@ -2,4 +2,4 @@
Redmine is a flexible project management web application written using Ruby on Rails framework.
More details can be found at http://www.redmine.org
More details can be found at in the doc directory or on the official website http://www.redmine.org

View File

@ -37,7 +37,7 @@ class GanttsController < ApplicationController
respond_to do |format|
format.html { render :action => "show", :layout => !request.xhr? }
format.png { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => "#{basename}.png") } if @gantt.respond_to?('to_image')
format.png { send_data(@gantt.to_image(@project), :disposition => 'inline', :type => 'image/png', :filename => "#{basename}.png") } if @gantt.respond_to?('to_image')
format.pdf { send_data(gantt_to_pdf(@gantt, @project), :type => 'application/pdf', :filename => "#{basename}.pdf") }
end
end

View File

@ -27,6 +27,9 @@ class VersionsController < ApplicationController
helper :projects
def show
@issues = @version.fixed_issues.visible.find(:all,
:include => [:status, :tracker, :priority],
:order => "#{Tracker.table_name}.position, #{Issue.table_name}.id")
end
def new

View File

@ -19,12 +19,13 @@ class Change < ActiveRecord::Base
belongs_to :changeset
validates_presence_of :changeset_id, :action, :path
before_save :init_path
def relative_path
changeset.repository.relative_path(path)
end
def before_save
path ||= ""
def init_path
self.path ||= ""
end
end

View File

@ -17,8 +17,10 @@
class IssueStatus < ActiveRecord::Base
before_destroy :check_integrity
has_many :workflows, :foreign_key => "old_status_id", :dependent => :delete_all
has_many :workflows, :foreign_key => "old_status_id"
acts_as_list
before_destroy :delete_workflows
validates_presence_of :name
validates_uniqueness_of :name
@ -89,4 +91,9 @@ private
def check_integrity
raise "Can't delete status" if Issue.find(:first, :conditions => ["status_id=?", self.id])
end
# Deletes associated workflows
def delete_workflows
Workflow.delete_all(["old_status_id = :id OR new_status_id = :id", {:id => id}])
end
end

View File

@ -79,6 +79,10 @@ class User < Principal
super
end
def mail=(arg)
write_attribute(:mail, arg.to_s.strip)
end
def identity_url=(url)
if url.blank?
write_attribute(:identity_url, '')

View File

@ -3,7 +3,6 @@
<li><%= link_to l(:label_project_plural), {:controller => 'admin', :action => 'projects'}, :class => 'projects' %></li>
<li><%= link_to l(:label_user_plural), {:controller => 'users'}, :class => 'users' %></li>
<li><%= link_to l(:label_group_plural), {:controller => 'groups'}, :class => 'groups' %></li>
<li><%= link_to l(:label_ldap_authentication), :controller => 'ldap_auth_sources', :action => 'index' %></li>
<li><%= link_to l(:label_role_and_permissions), {:controller => 'roles'}, :class => 'roles' %></li>
<li><%= link_to l(:label_tracker_plural), {:controller => 'trackers'}, :class => 'trackers' %></li>
<li><%= link_to l(:label_issue_status_plural), {:controller => 'issue_statuses'}, :class => 'issue_statuses' %></li>
@ -11,6 +10,7 @@
<li><%= link_to l(:label_custom_field_plural), {:controller => 'custom_fields'}, :class => 'custom_fields' %></li>
<li><%= link_to l(:label_enumerations), {:controller => 'enumerations'}, :class => 'enumerations' %></li>
<li><%= link_to l(:label_settings), {:controller => 'settings'}, :class => 'settings' %></li>
<li><%= link_to l(:label_ldap_authentication), {:controller => 'ldap_auth_sources', :action => 'index'}, :class => 'server_authentication' %></li>
<% menu_items_for(:admin_menu) do |item| -%>
<li><%= link_to h(item.caption), item.url, item.html_options %></li>
<% end -%>

View File

@ -1,6 +1,5 @@
<span id="attachments_fields">
<%= file_field_tag 'attachments[1][file]', :size => 30, :id => nil -%>
<label class="inline"><span id="attachment_description_label_content"><%= l(:label_optional_description) %></span><%= text_field_tag 'attachments[1][description]', '', :size => 60, :id => nil %>
<%= file_field_tag 'attachments[1][file]', :size => 30, :id => nil -%><label class="inline"><span id="attachment_description_label_content"><%= l(:label_optional_description) %></span><%= text_field_tag 'attachments[1][description]', '', :size => 60, :id => nil %>
</label>
</span>
<br />

View File

@ -8,7 +8,7 @@
<a href="#" class="submenu" onclick="return false;"><%= l(:field_status) %></a>
<ul>
<% @statuses.each do |s| -%>
<li><%= context_menu_link s.name, {:controller => 'issues', :action => 'edit', :id => @issue, :issue => {:status_id => s}, :back_url => @back}, :method => :post,
<li><%= context_menu_link s.name, {:controller => 'issues', :action => 'update', :id => @issue, :issue => {:status_id => s}, :back_url => @back}, :method => :put,
:selected => (s == @issue.status), :disabled => !(@can[:update] && @allowed_statuses.include?(s)) %></li>
<% end -%>
</ul>
@ -34,7 +34,7 @@
<ul>
<% @priorities.each do |p| -%>
<li><%= context_menu_link p.name, {:controller => 'issues', :action => 'bulk_edit', :ids => @issues.collect(&:id), :issue => {'priority_id' => p}, :back_url => @back}, :method => :post,
:selected => (@issue && p == @issue.priority), :disabled => !@can[:edit] %></li>
:selected => (@issue && p == @issue.priority), :disabled => (!@can[:edit] || @issues.detect {|i| !i.leaf?}) %></li>
<% end -%>
</ul>
</li>
@ -83,7 +83,7 @@
<ul>
<% (0..10).map{|x|x*10}.each do |p| -%>
<li><%= context_menu_link "#{p}%", {:controller => 'issues', :action => 'bulk_edit', :ids => @issues.collect(&:id), :issue => {'done_ratio' => p}, :back_url => @back}, :method => :post,
:selected => (@issue && p == @issue.done_ratio), :disabled => !@can[:edit] %></li>
:selected => (@issue && p == @issue.done_ratio), :disabled => (!@can[:edit] || @issues.detect {|i| !i.leaf?}) %></li>
<% end -%>
</ul>
</li>

View File

@ -70,6 +70,7 @@
<% end %>
<% end %>
<%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %>
<% content_for :sidebar do %>
<%= render :partial => 'issues/sidebar' %>

View File

@ -30,7 +30,7 @@
</div>
<h4>
<%= avatar(message.author, :size => "24") %>
<%= link_to h(message.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :anchor => "message-#{message.id}" } %>
<%= link_to h(message.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :r => message, :anchor => "message-#{message.id}" } %>
-
<%= authoring message.created_on, message.author %>
</h4>

View File

@ -20,7 +20,7 @@
</div>
<div style="float:right;">
<%= link_to l(:label_ldap_authentication), :controller => 'ldap_auth_sources', :action => 'index' %>
<%= link_to l(:label_ldap_authentication), {:controller => 'ldap_auth_sources', :action => 'index'}, :class => 'icon icon-server-authentication' %>
</div>
<%= submit_tag l(:button_save) %>

View File

@ -32,13 +32,10 @@
<%= render :partial => 'versions/overview', :locals => {:version => @version} %>
<%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
<% issues = @version.fixed_issues.find(:all,
:include => [:status, :tracker, :priority],
:order => "#{Tracker.table_name}.position, #{Issue.table_name}.id") %>
<% if issues.size > 0 %>
<% if @issues.present? %>
<fieldset class="related-issues"><legend><%= l(:label_related_issues) %></legend>
<ul>
<% issues.each do |issue| -%>
<% @issues.each do |issue| -%>
<li><%= link_to_issue(issue) %></li>
<% end -%>
</ul>

View File

@ -221,7 +221,7 @@ en-GB:
field_tracker: Tracker
field_subject: Subject
field_due_date: Due date
field_assigned_to: Assigned to
field_assigned_to: Assignee
field_priority: Priority
field_fixed_version: Target version
field_user: User

View File

@ -224,7 +224,7 @@ en:
field_tracker: Tracker
field_subject: Subject
field_due_date: Due date
field_assigned_to: Assigned to
field_assigned_to: Assignee
field_priority: Priority
field_fixed_version: Target version
field_user: User

View File

@ -542,16 +542,16 @@ fr:
label_closed_issues: fermé
label_closed_issues_plural: fermés
label_x_open_issues_abbr_on_total:
zero: zéro ouvert sur {{total}}
one: un ouvert sur {{total}}
zero: 0 ouvert sur {{total}}
one: 1 ouvert sur {{total}}
other: "{{count}} ouverts sur {{total}}"
label_x_open_issues_abbr:
zero: zéro ouvert
one: un ouvert
zero: 0 ouvert
one: 1 ouvert
other: "{{count}} ouverts"
label_x_closed_issues_abbr:
zero: zéro fermé
one: un fermé
zero: 0 fermé
one: 1 fermé
other: "{{count}} fermés"
label_total: Total
label_permissions: Permissions
@ -916,14 +916,14 @@ fr:
enumeration_system_activity: Activité système
label_board_sticky: Sticky
label_board_locked: Verrouillé
error_unable_delete_issue_status: Unable to delete issue status
error_can_not_delete_custom_field: Unable to delete custom field
error_unable_to_connect: Unable to connect ({{value}})
error_can_not_remove_role: This role is in use and can not be deleted.
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
error_unable_delete_issue_status: Impossible de supprimer le statut de demande
error_can_not_delete_custom_field: Impossible de supprimer le champ personnalisé
error_unable_to_connect: Connexion impossible ({{value}})
error_can_not_remove_role: Ce rôle est utilisé et ne peut pas être supprimé.
error_can_not_delete_tracker: Ce tracker contient des demandes et ne peut pas être supprimé.
field_principal: Principal
notice_failed_to_save_members: "Failed to save member(s): {{errors}}."
text_zoom_out: Zoom out
text_zoom_in: Zoom in
notice_unable_delete_time_entry: Unable to delete time log entry.
label_overall_spent_time: Overall spent time
notice_failed_to_save_members: "Erreur lors de la sauvegarde des membres: {{errors}}."
text_zoom_out: Zoom arrière
text_zoom_in: Zoom avant
notice_unable_delete_time_entry: Impossible de supprimer le temps passé.
label_overall_spent_time: Temps passé global

View File

@ -930,5 +930,5 @@ pt-BR:
notice_failed_to_save_members: "Falha ao gravar membro(s): {{errors}}."
text_zoom_out: Afastar zoom
text_zoom_in: Aproximar zoom
notice_unable_delete_time_entry: Unable to delete time log entry.
label_overall_spent_time: Overall spent time
notice_unable_delete_time_entry: Não foi possível excluir a entrada no registro de horas trabalhadas.
label_overall_spent_time: Tempo gasto geral

View File

@ -1019,8 +1019,8 @@ ru:
label_close_versions: Закрыть завершенные версии
label_board_sticky: Прикреплена
label_board_locked: Заблокирована
field_principal: Глава
field_principal: Имя
text_zoom_out: Отдалить
text_zoom_in: Приблизить
notice_unable_delete_time_entry: Unable to delete time log entry.
label_overall_spent_time: Overall spent time
notice_unable_delete_time_entry: Невозможно удалить запись журнала.
label_overall_spent_time: Всего затрачено времени

View File

@ -203,6 +203,7 @@ sv:
notice_account_pending: "Ditt konto skapades och avvaktar nu administratörens godkännande."
notice_default_data_loaded: Standardkonfiguration inläst.
notice_unable_delete_version: Denna version var inte möjlig att ta bort.
notice_unable_delete_time_entry: Tidloggning kunde inte tas bort.
notice_issue_done_ratios_updated: % klart uppdaterade.
error_can_t_load_default_data: "Standardkonfiguration gick inte att läsa in: {{value}}"
@ -689,6 +690,7 @@ sv:
label_changes_details: Detaljer om alla ändringar
label_issue_tracking: Ärendeuppföljning
label_spent_time: Spenderad tid
label_overall_spent_time: Total tid spenderad
label_f_hour: "{{value}} timme"
label_f_hour_plural: "{{value}} timmar"
label_time_tracking: Tidsuppföljning
@ -951,5 +953,3 @@ sv:
enumeration_doc_categories: Dokumentkategorier
enumeration_activities: Aktiviteter (tidsuppföljning)
enumeration_system_activity: Systemaktivitet
notice_unable_delete_time_entry: Unable to delete time log entry.
label_overall_spent_time: Overall spent time

View File

@ -243,6 +243,7 @@
notice_account_pending: "您的帳號已經建立,正在等待管理員的審核。"
notice_default_data_loaded: 預設組態已載入成功。
notice_unable_delete_version: 無法刪除版本。
notice_unable_delete_time_entry: 無法刪除工時記錄項目。
notice_issue_done_ratios_updated: 項目完成百分比已更新。
error_can_t_load_default_data: "無法載入預設組態: {{value}}"
@ -729,6 +730,7 @@
label_changes_details: 所有變更的明細
label_issue_tracking: 項目追蹤
label_spent_time: 耗用工時
label_overall_spent_time: 整體耗用工時
label_f_hour: "{{value}} 小時"
label_f_hour_plural: "{{value}} 小時"
label_time_tracking: 工時追蹤
@ -991,5 +993,3 @@
enumeration_doc_categories: 文件分類
enumeration_activities: 活動 (時間追蹤)
enumeration_system_activity: 系統活動
notice_unable_delete_time_entry: Unable to delete time log entry.
label_overall_spent_time: Overall spent time

View File

@ -428,7 +428,7 @@ zh:
one: 1 个项目
other: "{{count}} 个项目"
label_project_all: 所有的项目
label_project_latest: 最近更新的项目
label_project_latest: 最近的项目
label_issue: 问题
label_issue_new: 新建问题
label_issue_plural: 问题
@ -592,10 +592,10 @@ zh:
label_all_time: 全部时间
label_yesterday: 昨天
label_this_week: 本周
label_last_week:
label_last_week:
label_last_n_days: "最后 {{count}} 天"
label_this_month: 本月
label_last_month:
label_last_month:
label_this_year: 今年
label_date_range: 日期范围
label_less_than_ago: 之前天数少于
@ -907,22 +907,22 @@ zh:
label_board_sticky: 置顶
label_board_locked: 锁定
permission_export_wiki_pages: 导出 wiki 页面
setting_cache_formatted_text: 缓存已格式化文字
setting_cache_formatted_text: 缓存格式化文本
permission_manage_project_activities: 管理项目活动
error_unable_delete_issue_status: 无法删除问题状态
label_profile: 配置概况
permission_manage_subtasks: Manage subtasks
field_parent_issue: Parent task
label_subtask_plural: Subtasks
label_project_copy_notifications: Send email notifications during the project copy
label_profile: 简介
permission_manage_subtasks: 管理子任务
field_parent_issue: 父任务
label_subtask_plural: 子任务
label_project_copy_notifications: 复制项目时发送邮件通知
error_can_not_delete_custom_field: 不能删除自定义属性
error_unable_to_connect: 不能连接到 ({{value}})
error_can_not_remove_role: 该角色正在使用中, 不能删除.
error_can_not_delete_tracker: 该跟踪标签包含问题, 不能删除.
field_principal: Principal
label_my_page_block: My page block
notice_failed_to_save_members: "Failed to save member(s): {{errors}}."
text_zoom_out: Zoom out
text_zoom_in: Zoom in
notice_unable_delete_time_entry: Unable to delete time log entry.
label_overall_spent_time: Overall spent time
label_my_page_block: 我的工作台模块
notice_failed_to_save_members: "成员保存失败:{{errors}}。"
text_zoom_out: 缩小
text_zoom_in: 放大
notice_unable_delete_time_entry: 无法删除工时记录。
label_overall_spent_time: 所有项目耗用工时

View File

@ -1,6 +1,9 @@
class ChangeChangesPathLengthLimit < ActiveRecord::Migration
def self.up
# these are two steps to please MySQL 5 on Win32
change_column :changes, :path, :text, :default => nil, :null => true
change_column :changes, :path, :text, :null => false
change_column :changes, :from_path, :text
end

View File

@ -4,11 +4,89 @@ Redmine - project management software
Copyright (C) 2006-2010 Jean-Philippe Lang
http://www.redmine.org/
== v1.0.0
== 2010-07-18 v1.0.0 (Release candidate)
Adds context menu to the roadmap issue lists
#443: Adds context menu to the roadmap issue lists
#443: Subtasking
#741: Description preview while editing an issue
#1131: Add support for alternate (non-LDAP) authentication
#1214: REST API for Issues
#1223: File upload on wiki edit form
#1755: add "blocked by" as a related issues option
#2420: Fetching emails from an POP server
#2482: Named scopes in Issue and ActsAsWatchable plus some view refactoring (logic extraction).
#2924: Make the right click menu more discoverable using a cursor property
#2985: Make syntax highlighting pluggable
#3201: Workflow Check/Uncheck All Rows/Columns
#3359: Update CodeRay 0.9
#3706: Allow assigned_to field configuration on Issue creation by email
#3936: configurable list of models to include in search
#4480: Create a link to the user profile from the administration interface
#4482: Cache textile rendering
#4572: Make it harder to ruin your database
#4573: Move github gems to Gemcutter
#4664: Add pagination to forum threads
#4732: Make login case-insensitive also for PostgreSQL
#4812: Create links to other projects
#4819: Replace images with smushed ones for speed
#4945: Allow custom fields attached to project to be searchable
#5121: Fix issues list layout overflow
#5169: Issue list view hook request
#5208: Aibility to edit wiki sidebar
#5281: Remove empty ul tags in the issue history
#5291: Updated basque translations
#5328: Automatically add "Repository" menu_item after repository creation
#5415: Fewer SQL statements generated for watcher_recipients
#5416: Exclude "fields_for" from overridden methods in TabularFormBuilder
#5573: Allow issue assignment in email
#5595: Allow start date and due dates to be set via incoming email
#5752: The projects view (/projects) renders ul's wrong
#5781: Allow to use more macros on the welcome page and project list
Fixed #1288: Unable to past escaped wiki syntax in an issue description
Fixed #1334: Wiki formatting character *_ and _*
Fixed #1416: Inline code with less-then/greater-than produces @lt; and @gt; respectively
Fixed #2473: Login and mail should not be case sensitive
Fixed #2990: Ruby 1.9 - wrong number of arguments (1 for 0) on rake db:migrate
Fixed #3089: Text formatting sometimes breaks when combined
Fixed #3690: Status change info duplicates on the issue screen
Fixed #3691: Redmine allows two files with the same file name to be uploaded to the same issue
Fixed #3764: ApplicationHelperTest fails with JRuby
Fixed #4265: Unclosed code tags in issue descriptions affects main UI
Fixed #4745: Bug in index.xml.builder (issues)
Fixed #4852: changing user/roles of project member not possible without javascript
Fixed #4857: Week number calculation in date picker is wrong if a week starts with Sunday
Fixed #4883: Bottom "contextual" placement in issue with associated changeset
Fixed #4918: Revisions r3453 and r3454 broke On-the-fly user creation with LDAP
Fixed #4935: Navigation to the Master Timesheet page (time_entries)
Fixed #5043: Flash messages are not displayed after the project settings[module/activity] saved
Fixed #5081: Broken links on public/help/wiki_syntax_detailed.html
Fixed #5104: Description of document not wikified on documents index
Fixed #5108: Issue linking fails inside of []s
Fixed #5199: diff code coloring using coderay
Fixed #5233: Add a hook to the issue report (Summary) view
Fixed #5265: timetracking: subtasks time is added to the main task
Fixed #5343: acts_as_event Doesn't Accept Outside URLs
Fixed #5440: UI Inconsistency : Administration > Enumerations table row headers should be enclosed in <thead>
Fixed #5463: 0.9.4 INSTALL and/or UPGRADE, missing session_store.rb
Fixed #5524: Update_parent_attributes doesn't work for the old parent issue when reparenting
Fixed #5548: SVN Repository: Can not list content of a folder which includes square brackets.
Fixed #5589: "with subproject" malfunction
Fixed #5676: Search for Numeric Value
Fixed #5696: Redmine + PostgreSQL 8.4.4 fails on _dir_list_content.rhtml
Fixed #5698: redmine:email:receive_imap fails silently for mails with subject longer than 255 characters
Fixed #5700: TimelogController#destroy assumes success
Fixed #5751: developer role is mispelled
Fixed #5769: Popup Calendar doesn't Advance in Chrome
Fixed #5771: Problem when importing git repository
Fixed #5823: Error in comments in plugin.rb
== 2010-07-07 v0.9.6
Fixed: Redmine.pm access by unauthorized users
== 2010-06-24 v0.9.5
Linkify folder names on revision view
"fiters" and "options" should be hidden in print view via css
Fixed: NoMethodError when no issue params are submitted

View File

@ -11,61 +11,85 @@ http://www.redmine.org/
* Ruby on Rails 2.3.5 (official downloadable Redmine releases are packaged with
the appropriate Rails version)
* Rack 1.0.1
* RubyGems 1.3.1
* Rake 0.8.3
* A database:
* MySQL (tested with MySQL 5)
* PostgreSQL (tested with PostgreSQL 8.1)
* SQLite (tested with SQLite 3)
Optional:
* SVN binaries >= 1.3 (needed for repository browsing, must be available in PATH)
* RMagick (gantt export to png)
* SCM binaries (e.g. svn), for repository browsing (must be available in PATH)
* RMagick (to enable Gantt export to png images)
* Ruby OpenID Library >= version 2 (to enable OpenID support)
== Installation
1. Uncompress the program archive
2. Create an empty database: "redmine" for example
3. Configure database parameters in config/database.yml
for "production" environment (default database is MySQL)
3. Configure the database parameters in config/database.yml
for the "production" environment (default database is MySQL)
4. Generate a session store secret
Redmine stores session data in cookies by default, which requires
a secret to be generated. Run:
rake generate_session_store
a secret to be generated. Under the application main directory run:
rake generate_session_store
5. Create the database structure
5. Create the database structure. Under the application main directory:
rake db:migrate RAILS_ENV="production"
It will create tables and an administrator account.
Under the application main directory run:
rake db:migrate RAILS_ENV="production"
It will create all the tables and an administrator account.
6. Setting up permissions (Windows users have to skip this section)
6. Setting up permissions
The user who runs Redmine must have write permission on the following
subdirectories: files, log, tmp (create the last one if not present).
subdirectories: files, log, tmp & public/plugin_assets (create the last
two if they are not yet present).
Assuming you run Redmine with a user named "redmine":
mkdir tmp public/plugin_assets
sudo chown -R redmine:redmine files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets
Assuming you run Redmine with a user named redmine:
mkdir tmp
sudo chown -R redmine:redmine files log tmp
sudo chmod -R 755 files log tmp
7. Test the installation by running WEBrick web server:
ruby script/server -e production
7. Test the installation by running the WEBrick web server
Under the main application directory run:
ruby script/server -e production
Once WEBrick has started, point your browser to http://localhost:3000/
You should now see the application welcome page
You should now see the application welcome page.
8. Use default administrator account to log in:
8. Use the default administrator account to log in:
login: admin
password: admin
Go to "Administration" to load the default configuration data (roles,
trackers, statuses, workflow) and adjust application settings
Go to "Administration" to load the default configuration data (roles,
trackers, statuses, workflow) and to adjust the application settings
== Email delivery Configuration
== SMTP server Configuration
Copy config/email.yml.example to config/email.yml and edit this file
to adjust your SMTP settings.
Don't forget to restart the application after any change to this file.
Do not forget to restart the application after any change to this file.
Please do not enter your SMTP settings in environment.rb.
== References
* http://www.redmine.org/wiki/redmine/RedmineInstall
* http://www.redmine.org/wiki/redmine/EmailConfiguration
* http://www.redmine.org/wiki/redmine/RedmineSettings
* http://www.redmine.org/wiki/redmine/RedmineRepositories
* http://www.redmine.org/wiki/redmine/RedmineReceivingEmails
* http://www.redmine.org/wiki/redmine/RedmineReminderEmails
* http://www.redmine.org/wiki/redmine/RedmineLDAP

View File

@ -1,4 +1,4 @@
== Redmine upgrade procedure
== Redmine upgrade
Redmine - project management software
Copyright (C) 2006-2010 Jean-Philippe Lang
@ -8,26 +8,54 @@ http://www.redmine.org/
== Upgrading
1. Uncompress the program archive in a new directory
2. Copy your database settings (RAILS_ROOT/config/database.yml)
and SMTP settings (RAILS_ROOT/config/email.yml)
into the new config directory
and SMTP settings (RAILS_ROOT/config/email.yml) into the new
config directory
3. Copy the RAILS_ROOT/files directory content into your new installation
This directory contains all the attached files.
4. Copy the folders of the installed plugins and themes into new installation
5. Generate a session store secret
Redmine stores session data in cookies by default, which requires
a secret to be generated. Under the new application directory run:
rake generate_session_store
DO NOT REPLACE OR EDIT ANY OTHER FILES.
3. Generate a session store secret
Redmine stores session data in cookies by default, which requires
a secret to be generated. Run:
rake generate_session_store
4. Migrate your database (please make a backup before doing this):
rake db:migrate RAILS_ENV="production"
6. Migrate your database
5. Copy the RAILS_ROOT/files directory content into your new installation
This directory contains all the attached files
If you are upgrading to Rails 2.3.5 as part of this migration, you
need to upgrade the plugin migrations before running the plugin migrations
using:
rake db:migrate:upgrade_plugin_migrations RAILS_ENV="production"
Please make a backup before doing this! Under the new application
directory run:
rake db:migrate RAILS_ENV="production"
If you have installed any plugins, you should also run their database
migrations using:
rake db:migrate_plugins RAILS_ENV="production"
7. Clean up
Clear the cache and the existing sessions by running:
rake tmp:cache:clear
rake tmp:sessions:clear
8. Restart the application server (e.g. mongrel, thin, passenger)
9. Finally go to "Administration -> Roles & permissions" to check/set permissions
for new features, if any
== Notes
1. Rails 2.3.5 is required for version 0.9.
* Rails 2.3.5 is required for versions 0.9.x and 1.0.x.
2. When upgrading your code with svn update, don't forget to clear
the application cache (RAILS_ROOT/tmp/cache) before restarting.
== References
* http://www.redmine.org/wiki/redmine/RedmineUpgrade

View File

@ -227,9 +227,38 @@ sub authen_handler {
}
}
# check if authentication is forced
sub is_authentication_forced {
my $r = shift;
my $dbh = connect_database($r);
my $sth = $dbh->prepare(
"SELECT value FROM settings where settings.name = 'login_required';"
);
$sth->execute();
my $ret = 0;
if (my @row = $sth->fetchrow_array) {
if ($row[0] eq "1" || $row[0] eq "t") {
$ret = 1;
}
}
$sth->finish();
undef $sth;
$dbh->disconnect();
undef $dbh;
$ret;
}
sub is_public_project {
my $project_id = shift;
my $r = shift;
if (is_authentication_forced($r)) {
return 0;
}
my $dbh = connect_database($r);
my $sth = $dbh->prepare(
@ -309,7 +338,9 @@ sub is_member {
bindpw => $rowldap[4] ? $rowldap[4] : "",
filter => "(".$rowldap[6]."=%s)"
);
$ret = 1 if ($ldap->authenticate($redmine_user, $redmine_pass));
my $method = $r->method;
$ret = 1 if ($ldap->authenticate($redmine_user, $redmine_pass) && ((defined $read_only_methods{$method} && $permissions =~ /:browse_repository/) || $permissions =~ /:commit_access/));
}
$sthldap->finish();
undef $sthldap;

View File

@ -325,7 +325,7 @@ module Redmine
pdf.Ln
pdf.SetFontStyle('B',9)
subject_width = 70
subject_width = 100
header_heigth = 5
headers_heigth = header_heigth
@ -341,7 +341,7 @@ module Redmine
end
end
g_width = 210
g_width = 280 - subject_width
zoom = (g_width) / (gantt.date_to - gantt.date_from + 1)
g_height = 120
t_height = g_height + headers_heigth
@ -415,16 +415,19 @@ module Redmine
pdf.SetY(top)
pdf.SetX(15)
text = ""
if i.is_a? Issue
pdf.Cell(subject_width-15, 5, "#{i.tracker} #{i.id}: #{i.subject}".sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)'), "LR")
text = "#{i.tracker} #{i.id}: #{i.subject}"
else
pdf.Cell(subject_width-15, 5, "#{l(:label_version)}: #{i.name}", "LR")
text = i.name
end
text = "#{i.project} - #{text}" unless project && project == i.project
pdf.Cell(subject_width-15, 5, text, "LR")
pdf.SetY(top)
pdf.SetY(top + 0.2)
pdf.SetX(subject_width)
pdf.Cell(g_width, 5, "", "LR")
pdf.SetFillColor(255, 255, 255)
pdf.Cell(g_width, 4.6, "", "LR", 0, "", 1)
pdf.SetY(top+1.5)
if i.is_a? Issue

View File

@ -91,12 +91,12 @@ module Redmine
# Generates a gantt image
# Only defined if RMagick is avalaible
def to_image(format='PNG')
def to_image(project, format='PNG')
date_to = (@date_from >> @months)-1
show_weeks = @zoom > 1
show_days = @zoom > 2
subject_width = 320
subject_width = 400
header_heigth = 18
# width of one day in pixels
zoom = @zoom*2
@ -115,7 +115,14 @@ module Redmine
gc.stroke('transparent')
gc.stroke_width(1)
events.each do |i|
gc.text(4, top + 2, (i.is_a?(Issue) ? i.subject : i.name))
text = ""
if i.is_a? Issue
text = "#{i.tracker} #{i.id}: #{i.subject}"
else
text = i.name
end
text = "#{i.project} - #{text}" unless project && project == i.project
gc.text(4, top + 2, text)
top = top + 20
end

View File

@ -202,10 +202,10 @@ module Redmine #:nodoc:
# permission :say_hello, { :example => :say_hello }
#
# # A permission that can be given to registered users only
# permission :say_hello, { :example => :say_hello }, :require => loggedin
# permission :say_hello, { :example => :say_hello }, :require => :loggedin
#
# # A permission that can be given to project members only
# permission :say_hello, { :example => :say_hello }, :require => member
# permission :say_hello, { :example => :say_hello }, :require => :member
def permission(name, actions, options = {})
if @project_module
Redmine::AccessControl.map {|map| map.project_module(@project_module) {|map|map.permission(name, actions, options)}}

View File

@ -2,9 +2,9 @@ require 'rexml/document'
module Redmine
module VERSION #:nodoc:
MAJOR = 0
MINOR = 9
TINY = 5
MAJOR = 1
MINOR = 0
TINY = 0
# Branch values:
# * official release: nil

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

View File

@ -52,7 +52,7 @@ function addFileField() {
d.type = "text";
d.name = "attachments[" + fileFieldCount + "][description]";
d.size = 60;
var dLabel = document.createElement("label");
var dLabel = new Element('label');
dLabel.addClassName('inline');
// Pulls the languge value used for Optional Description
dLabel.update($('attachment_description_label_content').innerHTML)

View File

@ -64,6 +64,7 @@ h4, .wiki h3 {font-size: 13px;padding: 2px 10px 1px 0px;margin-bottom: 5px; bord
#admin-menu a.settings { background-image: url(../images/changeset.png); }
#admin-menu a.plugins { background-image: url(../images/plugin.png); }
#admin-menu a.info { background-image: url(../images/help.png); }
#admin-menu a.server_authentication { background-image: url(../images/server_key.png); }
#main {background-color:#EEEEEE;}
@ -696,6 +697,7 @@ div.wiki pre {
border: 1px solid #dadada;
width:auto;
overflow-x: auto;
overflow-y: hidden;
}
div.wiki ul.toc {
@ -837,6 +839,7 @@ padding-bottom: 3px;
.icon-report { background-image: url(../images/report.png); }
.icon-comment { background-image: url(../images/comment.png); }
.icon-summary { background-image: url(../images/lightning.png); }
.icon-server-authentication { background-image: url(../images/server_key.png); }
.icon-file { background-image: url(../images/files/default.png); }
.icon-file.text-plain { background-image: url(../images/files/text.png); }

View File

@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
ENV["RAILS_ENV"] ||= "test"
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
require File.expand_path(File.dirname(__FILE__) + '/helper_testcase')

View File

@ -32,10 +32,12 @@ class IssueStatusTest < ActiveSupport::TestCase
end
def test_destroy
count_before = IssueStatus.count
status = IssueStatus.find(3)
assert status.destroy
assert_equal count_before - 1, IssueStatus.count
assert_difference 'IssueStatus.count', -1 do
assert status.destroy
end
assert_nil Workflow.first(:conditions => {:old_status_id => status.id})
assert_nil Workflow.first(:conditions => {:new_status_id => status.id})
end
def test_destroy_status_in_use

View File

@ -35,6 +35,12 @@ class UserTest < ActiveSupport::TestCase
def test_truth
assert_kind_of User, @jsmith
end
def test_mail_should_be_stripped
u = User.new
u.mail = " foo@bar.com "
assert_equal "foo@bar.com", u.mail
end
def test_create
user = User.new(:firstname => "new", :lastname => "user", :mail => "newuser@somenet.foo")