Feature #588

Move timelog between projects

Added by Michael Pirogov over 9 years ago. Updated 14 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Time tracking
Target version:3.4.0
Resolution:Fixed

Description

It'll be nice to have an ability to move or delete your timelog entries between projects (as issue_move). For example
cause of mistake.

issue_move.png (8.89 KB) Michael Pirogov, 2008-02-07 20:41

destroy.rhtml Magnifier (1.26 KB) David Petersen, 2008-02-07 21:34

timelog_controller.rb.patch Magnifier (707 Bytes) David Petersen, 2008-02-07 21:34

details.rhtml.patch Magnifier (1.16 KB) David Petersen, 2008-02-07 21:34

edit.html.patch Magnifier (605 Bytes) David Petersen, 2008-02-07 21:34

redmine.rb.patch Magnifier (492 Bytes) David Petersen, 2008-02-07 21:34

en.yml.patch Magnifier (671 Bytes) David Petersen, 2008-02-07 21:34

change_timelog_project.patch Magnifier (5.02 KB) Marius BALTEANU, 2017-02-12 23:26


Related issues

Duplicated by Redmine - Feature #22399: Edit project of time entries Closed
Duplicated by Redmine - Feature #25381: Allow project selection when editing timelog entries Closed

Associated revisions

Revision 16450
Added by Jean-Philippe Lang 5 months ago

Timelog move between projects (#588).

Patch by Marius BALTEANU.

History

#1 Updated by David Petersen over 9 years ago

You can "move" a time entry by editing it and then changing the issue number, time really isn't linked to a project but a issue.

The ability to delete a time entry would be nice.

#2 Updated by Michael Pirogov over 9 years ago

time really isn't linked to a project but a issue.
I think, it is. Try to change Issue number to another, which not belongs to the current project and you'll get an error. I'll attach a screenshot. You can see, that error is displayed even if an Issue ID exists and received correctly.

P.S. "Allow cross-project issue relations" is enabled.

#3 Updated by Jean-Philippe Lang over 9 years ago

Indeed, the time entry can not currently be moved to an issue of another project.
I think I could change this behaviour. What do you think ?

#4 Updated by Michael Pirogov over 9 years ago

In our company we are spending less time to fill in a time entries. We just fill'em in one default 'stuff' project and then, near the end of the week and/or month, sort them. For another example: you have to do a very high priority work and after that you got next one (urgent too). There is no time to fill in all the forms to create a new issue. So you just made a 'timestamp' in 'stuff' (common, garbage, etc) project and at the end of a work day you'll create an issue ticket with all the things inside. After that you have to create a relation with your time entry. Back in time :) It's reverse logic: 1. Time entry 2. Issue. Something like that. Hope it's understandable. Sorry for my english, it's night up here now :)

#5 Updated by David Petersen over 9 years ago

Here are the files to add the delete functionality.

destroy.rhtml - should go /app/views/timelog/destroy.rhtml
timelog_controller.rb.patch - patch file for /app/controllers/timelog_controller.rb
details.rhtml.patch - patch file for /app/views/timelog/details.rhtml
edit.rhtml.patch - patch file for /app/views/timelog/edit.rhtml
redmine.rb.patch - patch file for /lib/redmine.rb
en.yml.patch - patch file for /lang/en.yml

Think thats all the changes needed.

#6 Updated by Jean-Philippe Lang over 9 years ago

Thanks. I'll have a look at all these files, even if a single diff would be easier to apply :-)

#7 Updated by David Petersen over 9 years ago

Sorry about that, Still learning about the whole patch thing.

#8 Updated by Michael Pirogov over 9 years ago

  • Target version set to 0.7

up. It's really one of major things...

#9 Updated by Jean-Philippe Lang over 9 years ago

  • Target version deleted (0.7)

#10 Updated by Toshi MARUYAMA over 6 years ago

  • Category set to Time tracking

#11 Updated by Jens Wellmeyer almost 6 years ago

The problem with moving spent time from one project to another still exists. We use redmine to track our time spent with over 200 Projects and would love to be able to transfer entries.
Any chance that this will be included in an upcoming version?

#12 Updated by Paco Alcaide over 4 years ago

  • In our company we would like this issue too.
  • We use time entries very hardly, and for now to move time entries, first we move it to another issue brother to the first one an inside the project (this is possible), and then we move the issue to another project or we make it daughter to another issue on the second project.

#13 Updated by Keven Marin about 4 years ago

+1 for this feature.

#14 Updated by Anton Nepomnyaschih over 3 years ago

It would be helpful to add more detailed error message, not only "Invalid issue", but for example "Timelog can't be moved between projects".

#15 Updated by Adrien Simon over 3 years ago

+1 for this feature from our side too :-)
If we can assist in anyway, drop me a note.

#16 Updated by Lydia Carley over 2 years ago

+1 from our company, too. For an efficient time logging tool this feature must be available.

#17 Updated by Simon Deziel almost 2 years ago

Having this implemented would be really nice as the current workarounds are quite cumbersome.

#18 Updated by Paco Alcaide over 1 year ago

  • We have updated our Redmine from v. 2.2.2.0 to 3.2.0 the past December 16th 2015, and today I have found that this issue is solved, but I could not say from which version, because our jump has been great.

#19 Updated by Toshi MARUYAMA over 1 year ago

  • Subject changed from Timelog move/delete to Timelog move/delete between projects

#20 Updated by Toshi MARUYAMA over 1 year ago

Paco Alcaide wrote:

  • We have updated our Redmine from v. 2.2.2.0 to 3.2.0 the past December 16th 2015, and today I have found that this issue is solved, but I could not say from which version, because our jump has been great.

Redmine 3.2 still cannot move timelog without issue.

#21 Updated by Paco Alcaide over 1 year ago

Toshi MARUYAMA wrote:

Paco Alcaide wrote:

  • We have updated our Redmine from v. 2.2.2.0 to 3.2.0 the past December 16th 2015, and today I have found that this issue is solved, but I could not say from which version, because our jump has been great.

Redmine 3.2 still cannot move timelog without issue.

If I understood good the issue, in Redmine we could not change the hours between proyects. I insist, we could not, because, due your comment, I promise you that right now, I have repeated the test and I have changed the issues numbers in 2 timelog entries at the same time, inside my Redmine v3.2, moving the hours to other issue, so to other proyect.

┬┐Maybe could be something about in the setup inside Redmine that let you do it?

#22 Updated by Toshi MARUYAMA over 1 year ago

You can move time log if it links to issue.
But, you cannot if it does not link to issue.

#23 Updated by Marius BALTEANU 8 months ago

We're very interested too in this feature, but I'm not sure how it should work.

I see 2 possibilities:
1. Allow moving between projects only spent times without issue id. This means that if you want to move a spent time with issue id to another project, first you need to unlink it from the issue and then change the project.

2. Allow moving all. This way seems a little bit more complex because there are multiple scenarios to take into consideration (clear issue when the project is changed, validate issue id and the project on save, etc).

Which is the desired behaviour?

#24 Updated by Marius BALTEANU 6 months ago

The attached patch allows moving timelogs between projects. I chose the second solution from my previous note (the issue_id is removed on project change event) because I think that is easier for the user.

Any feedback is welcomed. I really think that this feature is needed (we have a lot of cases per month where we need to change the timelog project) .

@Jean-Philippe Lang, the issue_id hidden_field_tag from timelog form

<% elsif params[:issue_id] %>
 <%= hidden_field_tag 'issue_id', params[:issue_id] %>

has any purpose? I'm asking because the issue_id text_field is always displayed in the form.

#25 Updated by Marius BALTEANU 6 months ago

Any feedback on this patch? I really think that this feature is needed.

#26 Updated by Jean-Philippe Lang 6 months ago

  • Assignee set to Jean-Philippe Lang
  • Target version set to 3.4.0

#27 Updated by Jean-Philippe Lang 5 months ago

  • Subject changed from Timelog move/delete between projects to Move timelog between projects
  • Status changed from New to Closed
  • Resolution set to Fixed

Patch committed, thanks Marius. I've merged the changes to the bulk edit form as it's not fully working, we should have a way to clear issues (otherwise the update might fail) and the activity list should be updated when changing the project.

@Jean-Philippe Lang, the issue_id hidden_field_tag from timelog form has any purpose? I'm asking because the issue_id text_field is always displayed in the form.

The :issue_id param is used to redirect with the proper params. The form contains a different parma: time_entry[:issue_id].

#28 Updated by Marius BALTEANU 5 months ago

Jean-Philippe Lang wrote:

Patch committed, thanks Marius. I've merged the changes to the bulk edit form as it's not fully working, we should have a way to clear issues (otherwise the update might fail) and the activity list should be updated when changing the project.

Thanks for committing the patch. The changes for bulk edit shouldn't be in the patch from the beginning, they are just a quick solution for us internally. I'll create a new issue when I've the changes ready for the core.

The :issue_id param is used to redirect with the proper params. The form contains a different parma: time_entry[:issue_id].

Ah, my bad, sorry for not seeing this.

#29 Updated by Go MAEDA 5 months ago

#30 Updated by Toshi MARUYAMA 4 months ago

  • Duplicated by Feature #25381: Allow project selection when editing timelog entries added

#31 Updated by Marius BALTEANU 14 days ago

Marius BALTEANU wrote:

Jean-Philippe Lang wrote:

Patch committed, thanks Marius. I've merged the changes to the bulk edit form as it's not fully working, we should have a way to clear issues (otherwise the update might fail) and the activity list should be updated when changing the project.

Thanks for committing the patch. The changes for bulk edit shouldn't be in the patch from the beginning, they are just a quick solution for us internally. I'll create a new issue when I've the changes ready for the core.

The patch that implements the project bulk edit for time entries was added to #26534.

Also available in: Atom PDF