-
Notifications
You must be signed in to change notification settings - Fork 17
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
Could not save the time entry #112
Comments
Hi Randy Thanks for your bug report. Could you please answer the following questions and perform the suggested steps?
Best regards |
Thanks for your prompt response.
Started POST "/time_entries.json" for 112.202.31.151 at 2017-08-20 19:55:00 +0800 Kind Regards, |
Did you use the same time logging activity in Redmine and RedTimer? Incidentally, RedTimer shows all available activities within Redmine, not only those permitted for the current project. |
Hi Yes, the same time logging activity. My local machine and the Redmine server (as well as the user account) are in the same timezone. Thank you! |
I have some futher explanation to it, since I have the same issue. I have a custom field "activity description" in spent time section which is mandatory. In "RedTimer" it seems that this particular field/ more likely every required custom field with out a default, causes the program to prevent time entry from saving. In Detail I traced the RedTimers POST which is: { "time_entry": { "activity_id": 10, "hours": 10, "issue_id": 1424 }} Response is 422: -> custom field activity description is missing in POST I tried to simulate it with curl I could reproduce behavior (same as RedTimer does):
and solve it with 3 things in curl or redmine:
Possible conclusion (when my assumptions are correct ;) ) e.g. Or probably with a some additional fields in RedTimer e.g. I think at least the feedback of the error message from 422: {"errors":["activity description cannot be blank"]} |
Thank you very much for the analysis! The qtredmine library already supports custom fields for time entries (https://github.com/fathomssen/qtredmine/blob/11765ed083467e02196dd356aa6441cbe223361a/SimpleRedmineClient.cpp#L349-L362). This feature is still missing in RedTimer, though. These custom fields could go under the comment field (see #24). If they are mandatory, they should always be displayed. If they are optional, they should be able to hide. What do you think? @randybalugo Is this also the case for you? Best regards |
I think it is very good way to do it. |
no really related to the bug. But I try to fix #112 / #24 and add custom fields. qmake -qt5 -r shows: none of the QMenu::addAction in qmenu.h matches |
Hi @fastclicker, whoops - seems that I used a Qt 5.6 method there. Could you please use a current Qt version from https://launchpad.net/~beineri? Best regards |
It worked like a charm with Qt 5.9.1: Plain install of ubuntu 16.04 wget http://download.qt.io/official_releases/qt/5.9/5.9.1/qt-opensource-linux-x64-5.9.1.run chmod +x qt-opensource-linux-x64-5.9.1.run sudo apt-get install mesa-common-dev -- I hope I haven't missed a step |
Hi
Your Redtimer is great! Thank you
I used Redmine 3.4.2 and I noticed that I can create issues via redtimer etc, but cannot save the time entry.
Environment:
Redmine version 3.4.2.stable.16947
Ruby version 2.4.1-p111 (2017-03-22) [x86_64-linux]
Rails version 4.2.8
Environment production
Database adapter Mysql2
SCM:
Subversion 1.9.3
Git 2.7.4
Filesystem
Redmine plugins:
redmine_edit_custom_fields 0.0.5
redmine_shared_api 0.0.2
production.log
Started POST "/time_entries.json" for 112.202.31.151 at 2017-08-20 18:51:45 +0800
Processing by TimelogController#create as JSON
Parameters: {"time_entry"=>{"activity_id"=>9, "custom_fields"=>[{"id"=>8, "value"=>"2017-08-20T10:51:43"}, {"id"=>9, "value"=>"2017-08-20T10:51:43"}], "hours"=>0.3952777777777778, "issue_id"=>2}}
Current user: john (id=6)
Rendered common/error_messages.api.rsb (0.6ms)
Completed 422 Unprocessable Entity in 90ms (Views: 4.1ms | ActiveRecord: 4.3ms)
The text was updated successfully, but these errors were encountered: