Closed arcadia-okta closed 3 months ago
Hey @arcadia-okta I know it's been a long time since this was reported, I apologize. I'm working on numerous updates for a new release, and have been merging various PRs from community members.
This issue was due to the need of switching to accountId
instead of username
, as you've mentioned. The related PR fixes this so you can do the following:
# Get a user
# Note: You can get all users, loop through them, store them in a database, and then be able to reference more easily
user = client.User.find('5e17314b0af0d70e911d3917')
# Get an issue
issue = client.Issue.find('TP-1')
# Assign a user to the issue
issue.save({ 'fields' => { 'assignee' => { 'accountId' => '5e17314b0af0d70e911d3917' } } })
# Print out the info
puts issue.key
puts "Reporter: #{issue.reporter.displayName}"
puts "Assignee: #{issue.assignee.displayName}"
We can no longer query by username -- here is the deprecation notice related to the thread you've posted.
I am using jira-ruby version 2.3.0 and I have the following code:
I have the
options
variable set withsite
,username
,password
, etc. I am using a personal access token for authentication. I have tried using the UUID I find on my JIRA profile page as well as my email and full name.I am able to use this client to retrieve a list of issues no problem, so I know it is configured correctly.
Ultimately, I want to be able to update the
assignee
field on issues. I have tried doingwith a valid
issue
, but this doesn't work in spite of the result of this call beingtrue
. The reason I got to trying to find my user was to get theaccountId
value (to be certain I was understanding it right) since in the above codename
is supposed to beaccountId
now.