-
Suggestion
-
Resolution: Unresolved
-
116
-
49
-
Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.
NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.
Currently it is not possible to add a comment via REST Remote API on behalf of another user.
It would be great if REST can perform this function in the future.
This functionality is now available for users of the JIRA REST API when building add-ons for JIRA Cloud. For more information, read our documentation.
- is related to
-
JRASERVER-35124 Add a comment via REST API on behalf of another user
- Gathering Interest
- relates to
-
JRACLOUD-30197 Log work via REST API for a given user
- Gathering Interest
[JRACLOUD-35124] Add a comment via REST API on behalf of another user
+1 for this. Any workarounds would be appreciated as well, maybe using OAuth2 with client ID & secret?
+1 - I need the ability to do this via REST API. Why can we raise a ticket on behalf but not add a comment in the same manner??!?! Crazy.
If this functionality is already implemented, where are the examples? I don't see such a possibility here:
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-comments/#api-rest-api-2-issue-issueidorkey-comment-post
nor here:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-post
This feature is crucial for each enterprise, which has a 3rd party solution as a customer facing Customer portal with a Jira Service Desk behind it.
Does it possible in 2024? And how to set another author from admin when adding a comment ? It's not smart when I have to change token from admin to other user
Ok, thanks. It says above it is now possible, so assumed I was just doing it wrong.
@Kev Trasler:
It's not possible. Author is automatically set to performer of API call.
Does anyone have an example of how to add/set the author
e.g.
// code placeholder { "body": "Test Comment from @mention", "author": { "name": "username" }}
+1 we need this for our backup and restore app for Jira, Rewind.
+1 we need this in order to comment on behalf of users on Jira service management projects
I've also faced this issue.
Implementing data synchronization.
All comments getting posted from admin and comments authors getting lost.
To follow up, I'm using the Jira Service Desk api, and, I can create a ticket on behalf of a user with the `raiseOnBehalfOf` flag, but, I can not similarly add a new comment also from that user with any kind of `commentOnBehalfOf`.
Community discussion: https://community.developer.atlassian.com/t/can-you-add-a-comment-via-api-from-another-user/37075/5
I also have the same case. Been asking in the community forums for an answer for a couple of weeks now, and was just directed to this issue.
Hi Dave,
Thanks for your reply. As far as I understand from the documentation, if we use OAuth 2.0, user will be asked to enter the user/password at the Atlasssian login page, right? We do not want that to happen.
We are using Jira Service Desk(JSD) for our customers, who are using our Application. So far they are using JSD portal link to report incident. We want them to report an incident from our Application itself. If customers again have to enter Jira details, then it does not serve the purpose.
Thanks
Rinju
Hi rinju.mukherjee and evmorov455593641,
We support user impersonation via OAuth 2.0. I've updated the link to the documentation. We don't have any plans to support user impersonation with basic authentication.
Regards,
Dave
is this (Raise Comment on Behalf) function available now in Jira Cloud Version?
There is any update, which says:
"This functionality is now available for users of the JIRA REST API when building add-ons for JIRA Cloud. For more information, read our documentation.".
The documentation link does not work. Can someone please confirm if this function is available? This is really an important and desired function for our org.
Thanks
Rinju
BXBD
I still think, universal "comments" class should resolve many problems. what for different tabs under issude shold be supported by different methods? Standarisation is needed for this. for example, last time when CVS support was dropped, I've written my own integration with CVS. This simply monitor CVS service, and put all new commits, simple as JIRA comments with some formating. But this is mixed with other regular comments. Then why we cannot give customization comment classes? It should ensure compatiblity for long time and many JIRA versions. Another benefit, it will prevent us for building additional unneeded JIRA plugins, because this can be supported by external services based on REST. Last question, giving availability for putting comment author and insert time is security rish? In current implementation, yes. But is it a problem when we limit IP range for technical user? Is it problem to give advanced admin rights to technical user? In my opinion not. Then I'm waiting for implementation, and I hope like many purchasers, my investment won't be wasted.
Florian it is not just you. I feel the same way. We are also waiting for kanban backlog to server version.
Hi everyone,
Is it just me or is Atlassian constantly removing or delaying features for the server version of JIRA? I understand that the majority of Atlassian's users is happy with the cloud version but this must not mean that server users aren't able to accomplish the simplest tasks like adding comments in behalf of other users. It is ridiculous that we would need third party plugins to try to get these things done. If Atlassian wants server users to slowly bleed out or hit a blocker before they finally move to the cloud version just say so and we will happily move away to other products. Don't get me wrong, this would be a very painful thing to do but we are getting to the point where we are worrying about the future of the server products and need to make sure our investment won't be wasted.
Florian
This is kinda crazy - every other service desk out there has an API which allows you to create tickets and add comments as any user, surely this isn't complicated?
I understand that it is now available in cloud? But isn't available in Server?
With comment is many bigger problem. At now one, second, third plugin doesn't work with new jira, for example at last time kicked out is CVS integration. It would be nice, creating comment class, and silently assign default class 'comments' for 'comments' tab. when comment class is different, then different named tab should be displayed. Idea is, no additional plugin is needed for new JIRA integration, example for svn/cvs/testlink/some automation or any else.
of course setting creation time and creation author for comment is strongly recommended under REST api. It is not a problem with REST availability for all users (for paranoic, it can be hidden by web proxy based on apache or nginx), problem is priviliges scheme. there should be additional privige what allows setting time and author for comments.
At now this functionality is needed for currently available single tabbed comments.
@Seb Ruiz - we would love to use this feature (and the others enabled by AC-1080) - but without AC-1014 we can't look up a user (in our case - we need to find a user by email address but this flow is initiated by an indexed git commit on our server not a user interaction). We don't currently request ADMIN scope - we're really hoping that AC-1014 (or other enabler) can come along so we can search for users.
I'd like to give a thumbs up to this feature as well. Currently importing issues with comments, and having the same set of problems. I'm using JIRA Cloud.
I know there are already tons of comments here, but I wanted to add my voice to the chorus.
Dave meyer, you promised it now deliever it
- JIRA 7.0 will ship without the SOAP and XML-RPC APIs
- The JIRA REST API will have functional parity with SOAP
Could you email me at dmeyer@atlassian.com? Our team will be able to give you some guidance on upcoming impersonation capabilities for Atlassian Connect add-ons.
Dave
Please add this as well. We are creating a Connect Add-On and the author always shows as the connect add on user, not the user we specify who created this. I even set the context in the JWT to the user we would like to see and it does not work. The JWT mentions context as only from the product to Jira, not the other way around. You would think that the add-on would be able to specify who on behalf we are running on.
Currently trialling David Erickson's 'sudo' plugin (https://marketplace.atlassian.com/plugins/com.jirasudo.jira-sudo) which he mentioned before and it's working very well so far - not only for comments but other operations as well.
Pity that we have to resort to 3rd party plugins but at least there is a work-around available.
https://developer.atlassian.com/blog/2015/05/jira-soap-api-announcement/
> Here are the key details:
> * JIRA 7.0 will ship without the SOAP and XML-RPC APIs
> * The JIRA REST API will have functional parity with SOAP
> * JIRA's rpc-soap and rpc-xmlrpc modules will be removed
> * JIRA will not ship with the rpc-jira-plugin
If one could set the author using the SOAP API but not with the REST API, then there isn't functional parity. 30 March 2016 and still no way of adding comments to JIRA issues on behalf of another user.
I suspect that Atlassian's security architecture simply isn't capable of this.
Please fix this! It is obviously needed from importing from other systems.
The request has been posted in 2013. We are now in 2016, the feature is still highly demanded and still not there
David, thanks for the information. Unfortunately, I don't see how I'll manage to convince the IT dept to buy the plugin. Nonetheless, I'll keep in mind that it exists, maybe for another project.
Cheers.
Olivier: Thanks for the comments! I had the same reaction you did pricing wise to many of the addons I saw on the marketplace, which when I looked, were approaching or even exceeding Jira's cost itself. I explicitly priced this to be a tiny fraction of Jira's cost (less than 5% of Jira now as your user count scales). No current plans to open source it, since it took a fair number of my hours to figure out how to get it working in the first place, create the marketplace entry, and ongoing time continue to maintain it as Jira changes.
is the user also substituted for Issue creation/modification/deletion?
Yes, ANY API call you make can be changed to look like it originated from another user, including anything to do with issues. In our organization we have glue code that integrates Jira with Gerrit, so that issues in Jira get transitioned from "In Progress" to "In Review", and "Done", as well as having work logged, and comments on the issue pointing to the Gerrit change, happen all automatically, and by the correct user that did the work, rather than the bot account. Which is useful for reporting, amongst other things.
Let me know if you have any other questions!
Your local IT crew has some odd expectations I think. The add-on is priced relatively low, and so is JIRA! I've no connection with the add-on vendor
Hey David! The plugin you made seems to perfectly fit what i'm looking for. But the licensing fees through the marketplace made my local IT crew refuse its installation, along with the fact that they can't review the code. That's too bad.
I'm a bit ashamed to ask: any plan to opensource your code and/or make the plugin free of charge?
Another question: is the user also substituted for Issue creation/modification/deletion?
James- Totally agree, but if you want an immediate solution look at my addon above. Otherwise, expect that you'll be waiting for a very long time (if ever) for Atlassian to fix it.
I just finished changing some Jira SOAP API client code to use the new Jira REST API. The old Jira SOAP API client code to add a comment to an issue was calling the RemoteComment object's setAuthor() method. This method was generated by CXF from the Jira SOAP service WSDL.
Interestingly, the javadocs at https://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/com/atlassian/jira/rpc/soap/beans/RemoteComment.html show no setAuthor() method for the RemoteComment object.
I verified that when adding a comment, the Jira SOAP API currently does allow you to specify an author other than the user whose auth token is being used to make the SOAP API call to add the comment. In other words, the JIRA SOAP API currently lets a user with admin privileges add a comment on behalf of another use by specifying an author in the RemoteComment object passed to the addComment method.
I think the existence of the ability to add a comment on behalf of another user in the Jira SOAP API has added to the expectation that the new Jira REST API would also support this functionality.
We have relied on this feature for years for internal workflow tracking. It's sudden removal causes us quite a bit of inconvenience.
There's an interesting discussion of this issue at https://jira.atlassian.com/browse/JRA-12522
For reference, see https://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/com/atlassian/jira/rpc/soap/JiraSoapService.html#addComment(java.lang.String, java.lang.String, com.atlassian.jira.rpc.soap.beans.RemoteComment and https://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/com/atlassian/jira/rpc/soap/beans/RemoteComment.html.
Shameless plug for anyone interested, I was frustrated by the absense of this functionality and desperately needed it for automation, so I created an addon that does it: https://marketplace.atlassian.com/plugins/com.jirasudo.jira-sudo feel free to contact me if you have any positive/negative feedback about it.
Our project needs this ability as well. Currently all comments are created as the authenticated user rather than as the User specified in the POST body of the request.
We also need this feature. We write to jira from an internal application and would like to maintain the same author.
How is this still not resolved? It seems this has been a problem for at least 5 years.