Closed nathaniel-holder closed 6 years ago
We're using it with a Jira Cloud account, and didn't hit that issue but your improvement seems sensible. Care to do a PR? Note that I'd check the username first, and fallback to the email rather than the other way around.
We are using Jira on premises, and didn't encounter that problem.
@christianrondeau I don't think the order matters in the where clause: if _username is an email (contains an @
sign), then compare to email, otherwise compare to name. it could be written like this, but it's logically equivalent as far as I can see:
(!_username.Contains('@') ? workLog?.author?.name : workLog?.author?.emailAddress) == _username)
It could also test on either name or email:
((workLog?.author?.name == _username) || (workLog?.author?.emailAddress == _username))
I meant the second, as my username may be an email too (afaik)
That looks good, merged! Thanks :)
Not sure if this is a bug with online Jira (vs locally installed), but I had to make this change to
JiraRestService.cs
to get the dedup functionality to work when using my online Jira account:I don't have a local Jira instance to test this fix against. Maybe someone else can?
Thanks!