Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option 'time entry' instead 'issue edit' #54

Open
fosfozol opened this issue Jan 18, 2018 · 1 comment
Open

Option 'time entry' instead 'issue edit' #54

fosfozol opened this issue Jan 18, 2018 · 1 comment
Milestone

Comments

@fosfozol
Copy link

Can you create a destination option after stop the counter?

LIKE
http://[redmine]/issues/123/edit?time_entry[hours]=1.0
OR
http://[redmine]/issues/123/time_entries/new?time_entry[hours]=1.0

def stop
@time_logger = current
if @time_logger.nil?
flash[:error] = l(:no_time_logger_running)
redirect_to :back
else
issue_id = @time_logger.issue_id
hours = @time_logger.hours_spent.round(2)
@time_logger.destroy
redirect_to :controller => 'issues',
:protocol => Setting.protocol,
:action => 'edit',
:id => issue_id,
:time_entry => { :hours => hours }
end
end

I tryied change 'edit' to 'time_entries/new', but I got this error:

ActionController::UrlGenerationError (No route matches {:action=>"time_entries/new", :controller=>"issues", :id=>123, :time_entry=>{:hours=>1.00}}):

Tkz

@cspk
Copy link

cspk commented Feb 3, 2018

+1 for this feature. There's an open pull request #50 for this.

@speedy32129 speedy32129 added this to the 0.5.5 milestone May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants