Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
1b83af6e
Commit
1b83af6e
authored
Sep 07, 2012
by
Alex Denisov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueController#new refactored
parent
f7894762
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
app/assets/javascripts/issues.js
app/assets/javascripts/issues.js
+2
-2
app/controllers/issues_controller.rb
app/controllers/issues_controller.rb
+1
-3
No files found.
app/assets/javascripts/issues.js
View file @
1b83af6e
...
...
@@ -137,10 +137,10 @@ function updateNewIssueURL(){
var
assignee_id
=
$
(
"
#assignee_id
"
).
val
();
var
new_href
=
""
;
if
(
milestone_id
){
new_href
=
"
milestone_id
=
"
+
milestone_id
+
"
&
"
;
new_href
=
"
issue[milestone_id]
=
"
+
milestone_id
+
"
&
"
;
}
if
(
assignee_id
){
new_href
=
new_href
+
"
assignee_id
=
"
+
assignee_id
;
new_href
=
new_href
+
"
issue[assignee_id]
=
"
+
assignee_id
;
}
if
(
new_href
.
length
){
new_href
=
new_issue_link
.
attr
(
"
href
"
)
+
"
?
"
+
new_href
;
...
...
app/controllers/issues_controller.rb
View file @
1b83af6e
...
...
@@ -37,9 +37,7 @@ class IssuesController < ApplicationController
end
def
new
@issue
=
@project
.
issues
.
new
@issue
.
milestone_id
=
params
[
:milestone_id
]
if
params
[
:milestone_id
].
present?
@issue
.
assignee_id
=
params
[
:assignee_id
]
if
params
[
:assignee_id
].
present?
@issue
=
@project
.
issues
.
new
(
params
[
:issue
])
respond_with
(
@issue
)
end
...
...
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