Feature #1505 » default_due_date.diff
| app/controllers/issues_controller.rb | ||
|---|---|---|
| 144 | 144 |
@custom_values = @project.custom_fields_for_issues(@issue.tracker).collect { |x| CustomValue.new(:custom_field => x,
|
| 145 | 145 |
:customized => @issue, |
| 146 | 146 |
:value => (params[:custom_fields] ? params[:custom_fields][x.id.to_s] : nil)) } |
| 147 |
# Default end date for the issue is the fixed version's effective date if a fixed version |
|
| 148 |
# is specified. |
|
| 149 |
|
|
| 150 |
@issue.due_date ||= @issue.fixed_version.effective_date if @issue.fixed_version && |
|
| 151 |
@issue.fixed_version.effective_date && |
|
| 152 |
@issue.fixed_version.effective_date > Date.today |
|
| 153 |
|
|
| 147 | 154 |
@issue.custom_values = @custom_values |
| 148 | 155 |
if @issue.save |
| 149 | 156 |
attach_files(@issue, params[:attachments]) |