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

on Jira side, search for users by mail, then by name #48

Closed
wants to merge 1 commit into from

Conversation

dieck
Copy link
Contributor

@dieck dieck commented Jun 2, 2022

search_users was looking to a query on the Object of pyclickup.User

the _fetch_pages function will not know how to handle this object, so it will use the string representation: "<pyclickup.User[12345678] 'Firstname Lastname'>", which does not (always) yield proper results.

This change searches first by mail address, which should be quite accurate, then by user name.

Output of variable params in jira.py / search_users()
before:
{'query': <pyclickup.User[12345678] 'Firstname Lastname'>, 'includeActive': True, 'includeInactive': False}

after:
{'query': 'firstname.lastname@domain.tld', 'includeActive': True, 'includeInactive': False}
{'query': 'Firstname Lastname', 'includeActive': True, 'includeInactive': False}

@dieck
Copy link
Contributor Author

dieck commented Jun 13, 2022

I have not created pull request, but if you merge this, you may want to merge https://github.com/dieck/clickup-to-jira/tree/search_user_with_caching as well, that is Caching for this search version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants