fix(contacts): handle line manager property creation#5304
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Adding the Line manager field created an empty x-managersname property and then immediately tried to focus the newly rendered editor. When the property had no matching contact value, the select received an undefined value and no focusable field was available. This produced the following JavaScript errors: - No focusable element found for property x-managersname - TypeError: can't access property "toLowerCase", this.localValue is undefined Keep empty manager properties represented as an empty string, guard select matching before lowercasing the local value, and store the only available manager using the vCard display name plus UID parameter instead of the internal contact key. Fixes nextcloud#4454 Signed-off-by: Nicolas Gelot <nicolas.gelot@e.email>
bb82bc4 to
f7f6af4
Compare
|
@hamza221 @GVodyanov could you consider this MR? or let me know if some other changes are required. Thanks. |
Hello, Really sorry for the delay, I will give it another review this week |
This comment was marked as low quality.
This comment was marked as low quality.
|
/backport to stable8.3 |
|
/backport to stable8.5 |
|
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/contacts/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
|
The backport to # Switch to the target branch and update it
git checkout stable8.3
git pull origin stable8.3
# Create the new backport branch
git checkout -b backport/5304/stable8.3
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick f7f6af4d
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/5304/stable8.3Error: Failed to check for changes with origin/stable8.3: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Adding the Line manager field created an empty x-managersname property and then immediately tried to focus the newly rendered editor. When the property had no matching contact value, the select received an undefined value and no focusable field was available.
This produced the following JavaScript errors:
Keep empty manager properties represented as an empty string, guard select matching before lowercasing the local value, and store the only available manager using the vCard display name plus UID parameter instead of the internal contact key.
Fixes #4454