Skip to content

Commit

Permalink
change_5054: Solved issue software-project#66 (software-project#66) o…
Browse files Browse the repository at this point in the history
…nly for create button not for create and continue. Still working on it
  • Loading branch information
LuceIt committed Aug 12, 2011
1 parent 273ce57 commit daac23a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
1 change: 0 additions & 1 deletion app/controllers/issue_sprints_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ class IssueSprintsController < IssuesController
helper SprintsHelper
helper CustomFieldsHelper


# Add a new issue
# The new issue will be created from an existing one if copy_from parameter is given
def new
Expand Down
9 changes: 6 additions & 3 deletions app/views/issue_sprints/_redirect_after_create.rhtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<script type="text/javascript">
Event.observe(window, 'load', function(){
if(<%= issue.redirect_to.nil? ? "false" :"true" %>){
window.location= '<%= issue.redirect_to %>';
if(<%= not issue.redirect_to.nil? %>){
<%= redirect_url = issue.redirect_to
issue.redirect_to = nil
issue.save %>
window.location= '<%= redirect_url %>';
}
});
</script>
</script>
Binary file added assets/stylesheets/spinner.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions lib/hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ def controller_issues_new_before_save(context = {})
context[:issue].user_story_id = context[:params][:issue][:user_story_id]
if context[:issue].user_story_id && context[:issue].fixed_version_id
if context[:issue].id
context[:issue].redirect_to = url_for(:controller => :sprints, :action => "show", :id => context[:issue].fixed_version_id, :project_id => context[:issue].project.identifier)+"/"+context[:issue].id
else
context[:issue].redirect_to = url_for(:controller => :sprints, :action => "show", :id => context[:issue].fixed_version_id, :project_id => context[:issue].project.identifier)
end
puts ":controller_issues_new_before_save 99"
contest[:issue].redirect_to = nil
else
context[:issue].redirect_to = url_for(:controller => :sprints, :action => "show", :id => context[:issue].fixed_version_id, :project_id => context[:issue].project.identifier)
end
end
end
end
Expand Down

0 comments on commit daac23a

Please sign in to comment.