Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
e4d4a12c
Commit
e4d4a12c
authored
Oct 15, 2006
by
Jean-Philippe Lang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://redmine.rubyforge.org/svn/trunk@32
e93f8b46-1217-0410-a6f0-8f06a7374b81
parent
4a1cfb3d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
86 additions
and
10 deletions
+86
-10
projects_controller.rb
redmine/app/controllers/projects_controller.rb
+24
-0
issue.rb
redmine/app/models/issue.rb
+1
-1
show.rhtml
redmine/app/views/issues/show.rhtml
+8
-0
add_issue.rhtml
redmine/app/views/projects/add_issue.rhtml
+1
-1
list_issues.rhtml
redmine/app/views/projects/list_issues.rhtml
+12
-5
move_issues.rhtml
redmine/app/views/projects/move_issues.rhtml
+24
-0
002_issue_move.rb
redmine/db/migrate/002_issue_move.rb
+9
-0
de.yml
redmine/lang/de.yml
+1
-0
en.yml
redmine/lang/en.yml
+4
-3
es.yml
redmine/lang/es.yml
+1
-0
fr.yml
redmine/lang/fr.yml
+1
-0
No files found.
redmine/app/controllers/projects_controller.rb
View file @
e4d4a12c
...
@@ -239,6 +239,30 @@ class ProjectsController < ApplicationController
...
@@ -239,6 +239,30 @@ class ProjectsController < ApplicationController
:filename
=>
'export.csv'
)
:filename
=>
'export.csv'
)
end
end
def
move_issues
@issues
=
@project
.
issues
.
find
(
params
[
:issue_ids
])
if
params
[
:issue_ids
]
redirect_to
:action
=>
'list_issues'
,
:id
=>
@project
and
return
unless
@issues
@projects
=
[]
# find projects to which the user is allowed to move the issue
@logged_in_user
.
memberships
.
each
{
|
m
|
@projects
<<
m
.
project
if
Permission
.
allowed_to_role
(
"projects/move_issues"
,
m
.
role_id
)}
# issue can be moved to any tracker
@trackers
=
Tracker
.
find
(
:all
)
if
request
.
post?
and
params
[
:new_project_id
]
and
params
[
:new_tracker_id
]
new_project
=
Project
.
find
(
params
[
:new_project_id
])
new_tracker
=
Tracker
.
find
(
params
[
:new_tracker_id
])
@issues
.
each
{
|
i
|
# category is project dependent
i
.
category
=
nil
unless
i
.
project_id
==
new_project
.
id
# move the issue
i
.
project
=
new_project
i
.
tracker
=
new_tracker
i
.
save
}
flash
[
:notice
]
=
l
(
:notice_successful_update
)
redirect_to
:action
=>
'list_issues'
,
:id
=>
@project
end
end
# Add a news to @project
# Add a news to @project
def
add_news
def
add_news
@news
=
News
.
new
(
:project
=>
@project
)
@news
=
News
.
new
(
:project
=>
@project
)
...
...
redmine/app/models/issue.rb
View file @
e4d4a12c
...
@@ -41,7 +41,7 @@ class Issue < ActiveRecord::Base
...
@@ -41,7 +41,7 @@ class Issue < ActiveRecord::Base
end
end
def
validate
def
validate
if
self
.
due_date
.
nil?
&&
!
@attributes
[
'due_date'
].
empty?
if
self
.
due_date
.
nil?
&&
@attributes
[
'due_date'
]
&&
!
@attributes
[
'due_date'
].
empty?
errors
.
add
:due_date
,
:activerecord_error_not_a_date
errors
.
add
:due_date
,
:activerecord_error_not_a_date
end
end
end
end
...
...
redmine/app/views/issues/show.rhtml
View file @
e4d4a12c
...
@@ -35,6 +35,14 @@
...
@@ -35,6 +35,14 @@
<%
end
%>
<%
end
%>
<%
if
authorize_for
(
'projects'
,
'move_issues'
)
%>
<%=
start_form_tag
({
:controller
=>
'projects'
,
:action
=>
'move_issues'
,
:id
=>
@project
}
)
%>
<%=
hidden_field_tag
"issue_ids[]"
,
@issue
.
id
%>
<%=
submit_tag
l
(
:button_move
)
%>
<%=
end_form_tag
%>
<%
end
%>
<%
if
authorize_for
(
'issues'
,
'destroy'
)
%>
<%
if
authorize_for
(
'issues'
,
'destroy'
)
%>
<%=
start_form_tag
({
:controller
=>
'issues'
,
:action
=>
'destroy'
,
:id
=>
@issue
}
)
%>
<%=
start_form_tag
({
:controller
=>
'issues'
,
:action
=>
'destroy'
,
:id
=>
@issue
}
)
%>
<%=
submit_tag
l
(
:button_delete
)
%>
<%=
submit_tag
l
(
:button_delete
)
%>
...
...
redmine/app/views/projects/add_issue.rhtml
View file @
e4d4a12c
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<p>
<%=
f
.
select
:priority_id
,
(
@priorities
.
collect
{
|
p
|
[
p
.
name
,
p
.
id
]}),
:required
=>
true
%>
</p>
<p>
<%=
f
.
select
:priority_id
,
(
@priorities
.
collect
{
|
p
|
[
p
.
name
,
p
.
id
]}),
:required
=>
true
%>
</p>
<p>
<%=
f
.
select
:assigned_to_id
,
(
@issue
.
project
.
members
.
collect
{
|
m
|
[
m
.
name
,
m
.
user_id
]}),
:include_blank
=>
true
%>
</p>
<p>
<%=
f
.
select
:assigned_to_id
,
(
@issue
.
project
.
members
.
collect
{
|
m
|
[
m
.
name
,
m
.
user_id
]}),
:include_blank
=>
true
%>
</p>
<p>
<%=
f
.
select
:category_id
,
(
@project
.
issue_categories
.
collect
{
|
c
|
[
c
.
name
,
c
.
id
]})
%>
</p>
<p>
<%=
f
.
select
:category_id
,
(
@project
.
issue_categories
.
collect
{
|
c
|
[
c
.
name
,
c
.
id
]})
,
:include_blank
=>
true
%>
</p>
<p>
<%=
f
.
text_field
:subject
,
:size
=>
80
,
:required
=>
true
%>
</p>
<p>
<%=
f
.
text_field
:subject
,
:size
=>
80
,
:required
=>
true
%>
</p>
<p>
<%=
f
.
text_area
:description
,
:cols
=>
60
,
:rows
=>
10
,
:required
=>
true
%>
</p>
<p>
<%=
f
.
text_area
:description
,
:cols
=>
60
,
:rows
=>
10
,
:required
=>
true
%>
</p>
<p>
<%=
f
.
text_field
:due_date
,
:size
=>
10
%><%=
calendar_for
(
'issue_due_date'
)
%>
</p>
<p>
<%=
f
.
text_field
:due_date
,
:size
=>
10
%><%=
calendar_for
(
'issue_due_date'
)
%>
</p>
...
...
redmine/app/views/projects/list_issues.rhtml
View file @
e4d4a12c
...
@@ -22,11 +22,15 @@
...
@@ -22,11 +22,15 @@
</tr>
</tr>
</table>
</table>
<%=
start_form_tag
({
:controller
=>
'projects'
,
:action
=>
'move_issues'
,
:id
=>
@project
},
:id
=>
'issues_form'
)
%>
<table
class=
"listTableContent"
>
<table
class=
"listTableContent"
>
<tr><td
colspan=
"7"
align=
"right"
>
<tr>
<small>
<%=
link_to
l
(
:label_export_csv
),
:action
=>
'export_issues_csv'
,
:id
=>
@project
.
id
%>
</small>
<td
colspan=
"6"
align=
"left"
><small>
<%=
check_all_links
'issues_form'
%>
</small></td>
</td></tr>
<td
colspan=
"2"
align=
"right"
><small>
<%=
link_to
l
(
:label_export_csv
),
:action
=>
'export_issues_csv'
,
:id
=>
@project
.
id
%>
</small></td>
<tr
class=
"ListHead"
>
</tr>
<tr
class=
"ListHead"
>
<td></td>
<%=
sort_header_tag
(
'issues.id'
,
:caption
=>
'#'
)
%>
<%=
sort_header_tag
(
'issues.id'
,
:caption
=>
'#'
)
%>
<%=
sort_header_tag
(
'issue_statuses.name'
,
:caption
=>
l
(
:field_status
))
%>
<%=
sort_header_tag
(
'issue_statuses.name'
,
:caption
=>
l
(
:field_status
))
%>
<%=
sort_header_tag
(
'issues.tracker_id'
,
:caption
=>
l
(
:field_tracker
))
%>
<%=
sort_header_tag
(
'issues.tracker_id'
,
:caption
=>
l
(
:field_tracker
))
%>
...
@@ -37,6 +41,7 @@
...
@@ -37,6 +41,7 @@
</tr>
</tr>
<%
for
issue
in
@issues
%>
<%
for
issue
in
@issues
%>
<tr
bgcolor=
"#
<%=
issue
.
status
.
html_color
%>
"
>
<tr
bgcolor=
"#
<%=
issue
.
status
.
html_color
%>
"
>
<td
width=
"15"
>
<%=
check_box_tag
"issue_ids[]"
,
issue
.
id
%>
</td>
<td
align=
"center"
>
<%=
link_to
issue
.
long_id
,
:controller
=>
'issues'
,
:action
=>
'show'
,
:id
=>
issue
%>
</td>
<td
align=
"center"
>
<%=
link_to
issue
.
long_id
,
:controller
=>
'issues'
,
:action
=>
'show'
,
:id
=>
issue
%>
</td>
<td
align=
"center"
>
<%=
issue
.
status
.
name
%>
</td>
<td
align=
"center"
>
<%=
issue
.
status
.
name
%>
</td>
<td
align=
"center"
>
<%=
issue
.
tracker
.
name
%>
</td>
<td
align=
"center"
>
<%=
issue
.
tracker
.
name
%>
</td>
...
@@ -50,4 +55,6 @@
...
@@ -50,4 +55,6 @@
<p>
<p>
<%=
pagination_links_full
@issue_pages
%>
<%=
pagination_links_full
@issue_pages
%>
[
<%=
@issue_pages
.
current
.
first_item
%>
-
<%=
@issue_pages
.
current
.
last_item
%>
/
<%=
@issue_count
%>
]
[
<%=
@issue_pages
.
current
.
first_item
%>
-
<%=
@issue_pages
.
current
.
last_item
%>
/
<%=
@issue_count
%>
]
</p>
</p>
\ No newline at end of file
<%=
submit_tag
l
(
:button_move
)
%>
<%=
end_form_tag
%>
\ No newline at end of file
redmine/app/views/projects/move_issues.rhtml
0 → 100644
View file @
e4d4a12c
<h2>
<%=
l
(
:button_move
)
%>
</h2>
<%=
start_form_tag
({
:action
=>
'move_issues'
,
:id
=>
@project
},
:class
=>
"tabular"
)
%>
<div
class=
"box"
>
<p><label>
<%=
l
(
:label_issue_plural
)
%>
:
</label>
<%
for
issue
in
@issues
%>
<b>
<%=
link_to
issue
.
long_id
,
:controller
=>
'issues'
,
:action
=>
'show'
,
:id
=>
issue
%>
</b>
-
<%=
issue
.
subject
%>
<%=
hidden_field_tag
"issue_ids[]"
,
issue
.
id
%>
<br
/>
<%
end
%>
<i>
(
<%=
@issues
.
length
%>
<%=
lwr
(
:label_issue
,
@issues
.
length
)
%>
)
</i></p>
<!--[form:issue]-->
<p><label
for=
"new_project_id"
>
<%=
l
(
:field_project
)
%>
</label>
<%=
select_tag
"new_project_id"
,
options_from_collection_for_select
(
@projects
,
"id"
,
"name"
,
@project
.
id
)
%>
</p>
<p><label
for=
"new_tracker_id"
>
<%=
l
(
:field_tracker
)
%>
</label>
<%=
select_tag
"new_tracker_id"
,
options_from_collection_for_select
(
@trackers
,
"id"
,
"name"
)
%>
</p>
</div>
<%=
submit_tag
l
(
:button_move
)
%>
<%=
end_form_tag
%>
redmine/db/migrate/002_issue_move.rb
0 → 100644
View file @
e4d4a12c
class
IssueMove
<
ActiveRecord
::
Migration
def
self
.
up
Permission
.
create
:controller
=>
"projects"
,
:action
=>
"move_issues"
,
:description
=>
"button_move"
,
:sort
=>
1061
,
:mail_option
=>
1
,
:mail_enabled
=>
0
end
def
self
.
down
Permission
.
find
(
:first
,
:conditions
=>
[
"controller=? and action=?"
,
'projects'
,
'move_issues'
]).
destroy
end
end
redmine/lang/de.yml
View file @
e4d4a12c
...
@@ -259,6 +259,7 @@ button_unlock: Entriegeln
...
@@ -259,6 +259,7 @@ button_unlock: Entriegeln
button_download
:
Fernzuladen
button_download
:
Fernzuladen
button_list
:
Aufzulisten
button_list
:
Aufzulisten
button_view
:
Siehe
button_view
:
Siehe
button_move
:
Bewegen
text_select_mail_notifications
:
Aktionen für die Mailbenachrichtigung aktiviert werden soll.
text_select_mail_notifications
:
Aktionen für die Mailbenachrichtigung aktiviert werden soll.
text_regexp_info
:
eg. ^[A-Z0-9]+$
text_regexp_info
:
eg. ^[A-Z0-9]+$
...
...
redmine/lang/en.yml
View file @
e4d4a12c
...
@@ -35,8 +35,8 @@ activerecord_error_not_a_date: is not a valid date
...
@@ -35,8 +35,8 @@ activerecord_error_not_a_date: is not a valid date
general_fmt_age
:
%
d yr
general_fmt_age
:
%
d yr
general_fmt_age_plural
:
%
d yrs
general_fmt_age_plural
:
%
d yrs
general_fmt_date
:
%%
b %%d, %%Y (%%a)
general_fmt_date
:
%%
m/%%d/%%Y
general_fmt_datetime
:
%%
b %%d, %%Y (%%a),
%%I:%%M %%p
general_fmt_datetime
:
%%
m/%%d/%%Y
%%I:%%M %%p
general_fmt_datetime_short
:
%%
b %%d, %%I:%%M %%p
general_fmt_datetime_short
:
%%
b %%d, %%I:%%M %%p
general_fmt_time
:
%%
I:%%M %%p
general_fmt_time
:
%%
I:%%M %%p
general_text_No
:
'
No'
general_text_No
:
'
No'
...
@@ -84,7 +84,7 @@ field_regexp: Regular expression
...
@@ -84,7 +84,7 @@ field_regexp: Regular expression
field_min_length
:
Minimum length
field_min_length
:
Minimum length
field_max_length
:
Maximum length
field_max_length
:
Maximum length
field_value
:
Value
field_value
:
Value
field_category
:
Cat
o
gory
field_category
:
Cat
e
gory
field_title
:
Title
field_title
:
Title
field_project
:
Project
field_project
:
Project
field_issue
:
Issue
field_issue
:
Issue
...
@@ -259,6 +259,7 @@ button_unlock: Unlock
...
@@ -259,6 +259,7 @@ button_unlock: Unlock
button_download
:
Download
button_download
:
Download
button_list
:
List
button_list
:
List
button_view
:
View
button_view
:
View
button_move
:
Move
text_select_mail_notifications
:
Select actions for which mail notifications should be sent.
text_select_mail_notifications
:
Select actions for which mail notifications should be sent.
text_regexp_info
:
eg. ^[A-Z0-9]+$
text_regexp_info
:
eg. ^[A-Z0-9]+$
...
...
redmine/lang/es.yml
View file @
e4d4a12c
...
@@ -259,6 +259,7 @@ button_unlock: Desbloquear
...
@@ -259,6 +259,7 @@ button_unlock: Desbloquear
button_download
:
Telecargar
button_download
:
Telecargar
button_list
:
Listar
button_list
:
Listar
button_view
:
Ver
button_view
:
Ver
button_move
:
Mover
text_select_mail_notifications
:
Seleccionar las actividades que necesitan la activación de la notificación por mail.
text_select_mail_notifications
:
Seleccionar las actividades que necesitan la activación de la notificación por mail.
text_regexp_info
:
eg. ^[A-Z0-9]+$
text_regexp_info
:
eg. ^[A-Z0-9]+$
...
...
redmine/lang/fr.yml
View file @
e4d4a12c
...
@@ -259,6 +259,7 @@ button_unlock: Déverrouiller
...
@@ -259,6 +259,7 @@ button_unlock: Déverrouiller
button_download
:
Télécharger
button_download
:
Télécharger
button_list
:
Lister
button_list
:
Lister
button_view
:
Voir
button_view
:
Voir
button_move
:
Déplacer
text_select_mail_notifications
:
Sélectionner les actions pour lesquelles la notification par mail doit être activée.
text_select_mail_notifications
:
Sélectionner les actions pour lesquelles la notification par mail doit être activée.
text_regexp_info
:
ex. ^[A-Z0-9]+$
text_regexp_info
:
ex. ^[A-Z0-9]+$
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment