Set Issue Author with Youtrack Rest API

 Is there any way to set the Author of an issue when using the REST Api. Either during creation or after via updating?

7 comments
Comment actions Permalink
Official comment

Hello,

Unfortunately, no, the issue reporter cannot be changed. 

 

Comment actions Permalink

How does the built-in email integration workflow set the issue reporter, when a comment is sent via e-mail?

0
Comment actions Permalink

Hello,

The issue's reporter can now be changed via REST API with the following endpoint: `api/issues/<issue id>/reporter`. Request body should contain new reporter's data: {"$type":"User","id":"<database id>","login":"<login>"}.

As for setting issue reporter via mailbox integration - it is set on issue creation depending on the mailbox integration settings (a predefined user or an existing user). When a comment is added, the issue reporter is not being updated. Could you please clarify your question so I can provide a more detailed answer?

0
Comment actions Permalink

Thank you Anastasia, for following up on this very old thread. My question isn't about creating new issues, it's about creating comments on existing issues. I'm trying to create a custom REST API integration which adds a comment to an existing issue and sets the author of that comment to user x. I've got this working now (I needed to add the low-level admin privilege), but when I create the comment and set user x as the author, user x is still receiving a notification (because they are also the reporter for the issue). I'm trying to understand how I can create a comment as a different user, but suppress that user from receiving a notification, as if the comment had been added via the email integration feature.

0
Comment actions Permalink

Hello, thank you for the clarifications.

Did I get it right that the idea is not to notify the reporter when a new comment is added? 

I'm afraid there are no ways to suppress the notification if a user is subscribed to that update (e.g. as a reporter of that issue). It is possible to edit the reporter's notification settings so that they don't get notifications about issues they reported - is this something you are trying to achieve? 

 

0
Comment actions Permalink

Let me put this in context of email integration. Let's say that customer A creates a new issue, which notifies agent X via e-mail.

Agent X replies via email. The YouTrack email integration feature adds Agent's X comment to the issue, which notifies customer A, but NOT Agent X (since Agent X was the sender of the email).

I want to do that same thing via the REST API. Is that possible?

0
Comment actions Permalink

Hello! There are two options to make it possible:

a) The REST API request is made from the account of Agent X.

b) The REST API request is applying a command in the silent mode (make sure to set the `silent` property to `true`). Agent X won't get a notification while Customer A will because workflow ignores the `silent` property. However, in this case, you'll have to make sure that Agent X's email is not set in the "All related emails" or "Last message related emails" fields (it could happen, for example, if this agent has already written messages to the same thread) because in that case, the agent will get a notification anyway.

0

Please sign in to leave a comment.