Auto-submitting issues from client app

  • 7
  • 34

Hi,

I have a desktop client application that auto-submits bug reports to YouTrack using the REST API. Currently, all issues get submitted as an 'AutoSubmit' user and assigned to me.

The drawback of this is that the users don't get notified about any updates/fixes to their issues. I'd prefer to have the client login as 'AutoSubmit', create a user for that specific person (client has info needed to do this), and then submit the bug as reported by that user. However, there doesn't seem to be a way to do this.

Things I've tried:
1) I can auto-create a user in the client, but I can't login using that user since I don't know the password since the user might change that. This is ok for the first issue, but same user reporting an issue from a different client or client changing account password is a problem.
2) If I create the issue from the AutoSubmit user, I can't force the ReportedBy field to be the actual user.
3) I can 'import' the issue instead, where I can set the ReportedBy, but I have to set a specific IssueNumber, and getting the next available Issue# seems to be a problem.

I'm out of ideas, can anyone make a suggestion?

Thanks,

Geoff
Hi Geoff,

try to use the mailbox integration, it creates new issue from incoming letter and can be configured so that for each new issue a new user is created.

Hi Dmitry,

Thanks for your reply. The challenge I see with using the mailbox integration is how to get my app to send that email? On some arbitrary 3rd party machine, I'm not likely to have an outbound mail server at hand.

I do seem to be able to get HTTP access from all my clients, which is why I was trying to leverage the REST API (somehow) to achieve pretty much exactly what you describe with mailbox integration, but without that triggering email.

Geoff

Ok, as for your suggestion 1), you can create a new user by the REST method PUT User, it creates new user with the specified password.

Hi Dmitry,

If I create a new user with PUT User, then to actually create the case I would need to logout and log back in using that user-id, correct?

So that works the first time. Let's say the user then gets the email, logs into YouTrack themselves, and changes their password?

If I need to create a second case, I wouldn't know the user's password - so how would that work?

Thanks,

Geoff

Hello, Geoff!
I'm sorry, but you can't change user's password through rest currently. And you can't get the password either, as we do not store passwords in plane text in our DB

Hi,

So to sum it up, there's no way for an application to create new bugs under specific user ID's if you're logged in as an admin user?

To support this, the REST API would need to support something like:
1) Accepting the submitting userid as a parameter when creating a bug report (like it does for importing)
2) Allow you to query the last BugID for a project so you could create a bug by 'importing' the new bug instead of 'creating' it

Thanks,

Geoff

Hi Geoff,
1. You can use this method to create issues on behalf of other users: http://confluence.jetbrains.com/display/YTD4/Import+Issues
2. Unfortunately, there is no way to get last created IssueId, but you can look at this methods: http://confluence.jetbrains.com/display/YTD4/Get+a+Number+of+Issues http://confluence.jetbrains.com/display/YTD4/Get+Issues+in+a+Project