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

Can't add user to existing team #2921

Closed
litinoveweedle opened this issue Nov 10, 2021 · 15 comments · Fixed by #3097
Closed

Can't add user to existing team #2921

litinoveweedle opened this issue Nov 10, 2021 · 15 comments · Fixed by #3097
Labels
Milestone

Comments

@litinoveweedle
Copy link

Hello,
when testing new Task management plugin I observed, than I can not add user to existing team.

To Reproduce

  1. As Administrator go to Team
  2. Select existing team and use context drop down menu to Edit
  3. From Add user select existing user, it appears in between team users
  4. Click on Save button, "Saved changes"popup appears briefly, than page is refreshed and added user is gone again

It is possible to add same user successfully into team as and System-Admin, using context menu in Users -> Teams and selecting team for given user.

Logfile

There are no time corresponding lines in the log

Additional context

  • Kimai version: 1.15.3
  • PHP version: 7.3.31-1~deb10u1
  • Device: my cool Pop!_OS 21.04
  • Browser Brave 1.31.88 Chromium: 95.0.4638.69 (Official Build) (64-bit)
@kevinpapst
Copy link
Member

kevinpapst commented Nov 10, 2021

I have seen the problem as well, but most of the times is simply works and I couldn't reproduce it when I tried.
Can you reproduce it reliable? If so: how? Then I could debug it

And what is my cool Pop!_OS 21.04

@litinoveweedle
Copy link
Author

Hello,

it was reported to me being originally observed on Windows 10, with Chrome. I validate the report on my Linux Ubuntu based Pop! OS 21.04 ( which is really really cool distro, I was just carried out little bit by your bug reporting template :-) ) and in Brave browser (based on Chrome as well).

But based on my previous experience with this behavior, it is not relate to system or browser etc. If I create new team, I can add user to it without problem. Issue does appear only after some time - maybe only from new session? Or something else change in time? Like some new database relation exists? I was unfortunately not able to isolate problem better, sorry. It would help to put debugging into section where database command is execute and try to execute it manually from DB console. Or maybe there is no commit, or commit is not executed?

@kevinpapst
Copy link
Member

My current guess would be some kind of Javascript glitch and not a DB issue. But I tried several times to reproduce without luck. Editing the same team works again after editing other attributes.
So for now I am a bit helpless, but I'll try later again. Oh and I'll checkout Pop! by time, .

@litinoveweedle
Copy link
Author

I can reproduce bug with 100% guarantee, so if you would like to have some remote access to my system (RDP) it is not and issue. Just let me know.

PopOS! is great for me, Ubuntu without Snap, but with both debs and Flatpak support. ;-)

@litinoveweedle
Copy link
Author

BTW there is no error in java script runtime (in browser console)

@kevinpapst
Copy link
Member

Any chance you can reproduce it on the demo as well? If it is no javascript error, I need to debug the issue and it would greatly help if I knew how.

@litinoveweedle
Copy link
Author

I tried to reproduce it in the plugin and stable demo but without luck. Is there way I can debug the issue in our environment?

@litinoveweedle
Copy link
Author

I set global log on my production DB :-o, to log any queries made during adding user to team. There is no INSERT, REPLACE or UPDATE executed during the test (except for few inserts into kimai2_sessions table).

@kevinpapst
Copy link
Member

For some reason the change is not detected and I am not sure why. The javascript might throw no error, but there is a counter that increases and that is important. Maybe there is something off. Just a wild guess...

@litinoveweedle
Copy link
Author

Could you craft for me javascript with debug (log console etc) at critical places? so we can at least locate the issue?

@kevinpapst
Copy link
Member

The javascript is inline in the template:
https://github.com/kevinpapst/kimai2/blob/master/templates/team/member-form.html.twig#L26
You need to reload the cache after changing the template in prod.

@litinoveweedle
Copy link
Author

I am not that good with jQuery, could you plase propose what and where to log?

@kevinpapst
Copy link
Member

No idea. And it is just a gut feeling, that might be wrong. It is really annoying, that I cannot reproduce it.
Just tried again for 10 minutes....

@litinoveweedle
Copy link
Author

I can reproduce it always, but I don't know how to help more. BTW we have users in LDAP, but I don't think this is the cause.

@kevinpapst kevinpapst added this to the 1.18 milestone Jan 25, 2022
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants