-
Notifications
You must be signed in to change notification settings - Fork 35
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
I can unassign an issue but I can't assign it to a user or myself #37
Comments
The first thing I would do is to try without ejira, using only jiralib2. Something like: (jiralib2-assign-issue "<issue-key>" "<username>") Maybe your jira server wants to have a different type of username, such as email address? |
That was a good idea, it did provide some insight. That request fails with this message: |
The reason might be that (jiralib2-session-call (format "/rest/api/2/issue/%s/assignee" "<issue-key>")
:type "PUT"
:data (json-encode '((key . "<username>"))))) ;; <-- see 'key' instead of 'name' here The key-field is not necessarily the same as the name-field (allthough it is so on our JIRA instance) but you can figure it out for example via the assignable users api (open Also, one of the reasons the email address did not work was that it got sent as a |
Thanks for your suggestion, here's where I'm at. I'm able to get back user information from After some tinkering, I found this works:
|
Per the Jira API deprecation notice here, users can no longer be identified over the API by name, only by account ID. It looks like PR#24 on this repo and PR#6 on your jiralib2 repo address this deprecation. Is there anything preventing those PRs from being pushed through? |
The jiralib2#6 has an open discussion pending. There has not been activity in months so maybe I will merge it with the modifications. #24 seems to have a FIXME for |
Good to know, I did not see the discussion on jiralib2. As for the FIXME, I'm not entirely sure what an inline-node is, but I did get mentioning users to work again using accountId. It's not very pretty, but it in the org file it looks like this: I changed ejira--get-users:
The only change is mapping the key to accountId instead of name. It might also be a good idea to swap the I then changed ejira-mention-user to this:
The only change here is updating the format in the insert. These changes make mentioning users work again. |
Problem as far as I recall was on the side of ox-jira, this one needs a fix as well to correctly convert the user from org to jira. I'm sorry I can't look into this right now ... |
That's ok. If the only issue is that mentioning users is broken, can we use something like what I'm proposing to get it working and deal with ox-jira in another PR? I don't know much about the nature of the FIXME so someone please let me know if I'm missing something. |
I can look up the code change I made for ox-jira tomorrow, it's not much, and then it works in both directions. I've been using the code for months now without issues. The advantage is to then have a proper Org Link displaying the user's full name in the Org file and a working mention on the Jira side. |
As I just had to modify one function, I put it in my .emacs instead of patching ox-jira:
|
I'll test this. Do you mind if I look into a PR for this on ox-jira? |
Certainly not, please go ahead, I was just too lazy to do it myself. |
Submitted PR to ox-jira, it's now in MELPA. I just tested this modified definition of ejira-mention-user and it works:
Would it be easier to amend MadEarl's pull request or should I create a new one? |
Using the
ejira-assign-issue
command, I am able to mark an issue as Unassigned and it propagates to the server and updates back locally, but when I try to assign the issue to myself, I get the:ejira_assigned
tag next to the issue indicating I'm the assignee, but the assignee property doesn't update and the server still saysUnassigned
. Also, when I try to assign the issue to a teammate, the assignee on the server isUnassigned
. I don't think this is a permissions issue, I have admin rights to the project. There aren't any errors coming back from ejira. Any ideas on how to troubleshoot?The text was updated successfully, but these errors were encountered: