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

restart via API allows to copy description #782

Merged
merged 9 commits into from
May 13, 2019

Conversation

kevinpapst
Copy link
Member

@kevinpapst kevinpapst commented May 12, 2019

Description

  • Moved the logic to restart a timesheet entry to the API
  • Added option to copy description and tags

New behavior:

  • A "recent activity" restart will restart the record WITHOUT copying the data
  • A restart from the timesheet will copy description & tags

Fixes #626

Can be tested at: https://demo-branch.kimai.org/en/timesheet/

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I ran bin/console kimai:codestyle --fix to verify the correct code style
  • I have added tests to cover my changes
  • I agree that this code is used in Kimai and will be published under the MIT license

@kevinpapst kevinpapst added this to the 1.0 milestone May 12, 2019
@kevinpapst kevinpapst changed the title Restart copy description restart via API allows to copy description May 12, 2019
@blochwitz
Copy link

Cant review that while during the installation process creating the database schema fails:

Schema-Tool failed with Error 'An exception occurred while executing 'CREATE TABLE kimai2_tags (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_27CAF  
  54C5E237E06 (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB': 

@kevinpapst
Copy link
Member Author

Hm, the installation works on a lot of machines with MySQL and MariaDB.
Just copy&pasted that into two sql consoles just to make sure, worked as well.
Please open a new issue with the full error message.

@kevinpapst
Copy link
Member Author

For simple testing, I installed the branch at: https://demo-branch.kimai.org/en/timesheet/

@blochwitz
Copy link

blochwitz commented May 13, 2019

Hmm, i made a clean installation of the branch following the installation instruction and got the error during the installation step creating the database schema.

blochwitz
blochwitz previously approved these changes May 13, 2019
Copy link

@blochwitz blochwitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the demo the new action „Start again“ works fine...

@kevinpapst
Copy link
Member Author

Thanks for testing!
I am sure that you got the error, I just don't know what the reason might be as there was no error message visible. If you have the time we should investigate a bit, I don't want to risk some hidden bugs.

@blochwitz
Copy link

Okay. I try to explain.

I made two tests: one with an existing database (kimai2 v0.9) by using the migration command - this fails with an error. another one with an database i've cleared before - it fails with an error too (the key part you see above).

@kevinpapst
Copy link
Member Author

Can you share the full error messages for both ways? Or the database, so I can test it manually?

@blochwitz
Copy link

blochwitz commented May 13, 2019

Okay. This is the Output after trying to migrate

Bildschirmfoto 2019-05-13 um 16 12 19

and that the output after trying to create the schema in an empty database

Bildschirmfoto 2019-05-13 um 16 16 26

@kevinpapst
Copy link
Member Author

Thats very helpful, thanks!
I know what to do and must check if I can reconfigure my databases to show these key-length errors as well.
I'll prepare a new branch with these changes incorporated and let you know.

@kevinpapst kevinpapst merged commit bbe1f9b into master May 13, 2019
@kevinpapst kevinpapst deleted the restart-copy-description branch May 13, 2019 15:32
@rarvin
Copy link

rarvin commented May 13, 2019 via email

@rarvin
Copy link

rarvin commented May 13, 2019

Dear all,

Carried out testing using the following link

Tried testing this and could confirm that everything works well.
https://demo-branch.kimai.org/en/team/timesheet/

Restarting an activity from the timesheet copy all of the details including existing applied tages, this is great functionality.
Started a task from the + and I can enter the description from scratch, even could edit the description for a running or stopped task.
Started a task from the recent activities and the description is not copied which is as intended.
Could stop tasks from the play button; create new tasks from scratch.

In general the copy description functionality works very well. Thank you.

@lock
Copy link

lock bot commented Jul 12, 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 Jul 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restarting a entry- missing description
3 participants