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
Kazuhiko Shiozaki
gitlab-ce
Commits
26552051
Commit
26552051
authored
Sep 07, 2012
by
Alex Denisov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pre-selected milestone implemented
parent
09263719
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
1 deletion
+24
-1
app/assets/javascripts/issues.js
app/assets/javascripts/issues.js
+21
-0
app/controllers/issues_controller.rb
app/controllers/issues_controller.rb
+1
-0
app/views/issues/index.html.haml
app/views/issues/index.html.haml
+1
-1
features/step_definitions/project/project_issues_steps.rb
features/step_definitions/project/project_issues_steps.rb
+1
-0
No files found.
app/assets/javascripts/issues.js
View file @
26552051
...
...
@@ -80,6 +80,10 @@ function issuesPage(){
$
(
this
).
closest
(
"
form
"
).
submit
();
});
$
(
"
#new_issue_link
"
).
click
(
function
(){
updateNewIssueURL
();
});
$
(
'
body
'
).
on
(
'
ajax:success
'
,
'
.close_issue, .reopen_issue, #new_issue
'
,
function
(){
var
t
=
$
(
this
),
totalIssues
,
...
...
@@ -126,3 +130,20 @@ function issuesCheckChanged() {
$
(
'
.issues_filters
'
).
show
();
}
}
function
updateNewIssueURL
(){
var
new_issue_link
=
$
(
"
#new_issue_link
"
);
var
milestone_id
=
$
(
"
#milestone_id
"
).
val
();
var
assignee_id
=
$
(
"
#assignee_id
"
).
val
();
var
new_href
=
""
;
if
(
milestone_id
){
new_href
=
"
milestone_id=
"
+
milestone_id
+
"
&
"
;
}
if
(
assignee_id
){
new_href
=
new_href
+
"
assignee_id=
"
+
assignee_id
;
}
if
(
new_href
.
length
){
new_href
=
new_issue_link
.
attr
(
"
href
"
)
+
"
?
"
+
new_href
;
new_issue_link
.
attr
(
"
href
"
,
new_href
);
}
};
app/controllers/issues_controller.rb
View file @
26552051
...
...
@@ -38,6 +38,7 @@ class IssuesController < ApplicationController
def
new
@issue
=
@project
.
issues
.
new
@issue
.
milestone_id
=
params
[
:milestone_id
]
if
params
[
:milestone_id
].
present?
respond_with
(
@issue
)
end
...
...
app/views/issues/index.html.haml
View file @
26552051
...
...
@@ -6,7 +6,7 @@
.right
.span5
-
if
can?
current_user
,
:write_issue
,
@project
=
link_to
new_project_issue_path
(
@project
),
class:
"right btn"
,
title:
"New Issue"
,
remote:
true
do
=
link_to
new_project_issue_path
(
@project
),
class:
"right btn"
,
title:
"New Issue"
,
remote:
true
,
id:
"new_issue_link"
do
%i
.icon-plus
New Issue
=
form_tag
search_project_issues_path
(
@project
),
method: :get
,
remote:
true
,
id:
"issue_search_form"
,
class: :right
do
...
...
features/step_definitions/project/project_issues_steps.rb
View file @
26552051
...
...
@@ -57,6 +57,7 @@ Given /^I fill in issue search with "(.*?)"$/ do |arg1|
end
When
/^I select milestone "(.*?)"$/
do
|
milestone_title
|
#puts page.body
select
milestone_title
,
from:
"milestone_id"
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