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

Merge projects and/or activities #406

Closed
robinrosenstock opened this issue Nov 11, 2018 · 14 comments
Closed

Merge projects and/or activities #406

robinrosenstock opened this issue Nov 11, 2018 · 14 comments

Comments

@robinrosenstock
Copy link

Is your feature request related to a problem? Please describe.
At the moment I have created many projects (this was before the migration to the separate project and activity design) and I would like to bring them down to only two projects (personal and work; maybe in the future I will divide them again more). So the task I would like to perform is some kind of merging the projects (and their times) into another. But at the moment this is not possible. I have to filter for project/activity (which I want to merge) and edit each time entry individually (and changing the project/activity to which I want to merge there). Now, we say, I have a project called "hobbies", where I want all (1000) time entries to be merged into the project "personal". For that at the moment I need to manually filter and edit each of the 1000 time entries individually.

Describe the solution you'd like
I would like to perform is some kind of merging the projects/activities (and their times) into another.

Describe alternatives you've considered
The functionionality of "multi edit" maybe have the same effect or is similiar.

@kevinpapst
Copy link
Member

kevinpapst commented Nov 11, 2018

I thought about adding a "re-assign form" to the warning message, which shows up when you try to delete a activity/project/customer which has assigned timesheet entries.
Lets say you want to delete project "foo" then you get a select-box to choose any other project.
You choose "bar" and then the attached timesheet/activities will be moved from "foo" to "bar".

This workflow could later on be used to build a UI that allows to move things around.

Yes: needed and good idea, thanks for posting!

@kevinpapst
Copy link
Member

I attached a PR that I would consider work-in-progress for now.
I added the ability to select an alternative activity upon deletion.
But: selection is only possible for global activities OR an activity from the same project, otherwise we could create wrong assignments on the timesheet entries.
Does that help?

@kevinpapst kevinpapst added this to the 0.6 - Global activities milestone Nov 11, 2018
@robinrosenstock
Copy link
Author

Thanks for tackling this.

To transfer one activity to another is really good. But unfortunately it does not help me to transfer whole projects, as explained above. Is it possible to implement the same thing as you done now but when deleting projects as well?

@kevinpapst
Copy link
Member

Moving projects is a bit more complicated, that's why I started with Activities and see if that's a way that would work. Will work on the projects later today and let you know.

@kevinpapst
Copy link
Member

Latest commit includes support for projects

@robinrosenstock
Copy link
Author

I get:
Twig_Error_Runtime
HTTP 500 Internal Server Error
Impossible to access an attribute ("customer") on a null variable.
in templates/timesheet/index.html.twig (line 53)

@kevinpapst
Copy link
Member

Uups, hope you tried than on a development/test database.
So the project wasn't properly updated in your timesheets before deletion.
I will add some error handling.

@robinrosenstock
Copy link
Author

of course I always try on the development server and the test data with susan_super etc.

@kevinpapst
Copy link
Member

Can you have a look if there is something relevant in var/log/dev.log ? Unfortunately it works for me ... so I don't see what could have went wrong.

@robinrosenstock
Copy link
Author

now it works on my side as well. Propably old table data..

@robinrosenstock
Copy link
Author

I'll test it on my data (after backup) and tell you

@robinrosenstock
Copy link
Author

Seems to be fine 🥇

Though it is a bit confusing to push the delete button, if you transfer the project to another

@kevinpapst
Copy link
Member

True, but as I said often before: one step after another ;-)

@lock
Copy link

lock bot commented Jan 10, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@lock lock bot locked and limited conversation to collaborators Jan 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants