Hello,
I'm trying to create custom avatar with Jira API (Jira 5). I need somehow create new "Avatar" object…but I didn't find such method in any @PublicApi classes…only one such I'd need is in AvatarImpl class, which belongs to jira-core artifact, which as I can see, is not recommended to use…
Is there any other way? For example with "public" API classes & methods? Or the impl class is good enough?
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dieter,
thanks for reply!
Yup, AvatarManager is ok for me, but I'm confused about how to get new "Avatar" object that I can pass as new Avatar to AvatarManager. So, how to create new "Avatar" type object? AvatarImpl and there method createCustomAvatar?
Or I'm totally wrong? :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But…still problematic…I have same problem as here: https://answers.atlassian.com/questions/10092/null-pointer-exception-when-creating-an-avatar :( Any idea please? I can't find the null reference…
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok good, I'm able to upload new avatar with Jira api…I think there is one bug…when I upload new image as avatar, which owner is "admin", then the thumbnail in the "change avatar picture" dialog in jira user profile is missing, there is just the usual "missing picture" image. With normal user it is ok, no problen.
One more question, I can't find method for actual change of avatar for specifi user…Is there somethink like this? Have to be, because it is possible through REST API…I really how to download Jira source codes at monday, at work :)
EDIT: ooops, I lied a little bit…there is not such method for just "changing" of avatar for user…
I have messed up all these things now, need some rest :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm talking here with myself, but nevermind, next problem has been solved.
I'm lame and blind :D Sure in REST API is a method to actually change the user's avatar.
PUT /user/avatar
username as parameter
JSON payload (example): {"id":"10113","isSystemAvatar":true,"isSelected":false}
Woohoo, it works :D I'm really happy :D Now I have probably all major problems solved…
Btw, many thanks to Chrome "Inspect tool", I don't know how it is exactly called, it is like Firebug in Firefox…I was able to research REST calls in Jira Avatar settings and find the one I need this way. (I know the PUT /user/avatar is in documentation, but, you know how it goes when one is lame as me :D)
Also the REST Api broswer is Jira is great tool…
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.