Yes, you can do this, but you REALLY do not want to do it this way.
The process is
Are you really sure this is the best option? When you could do it perfectly safely and without taking anything offline via the UI, or REST?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is it possible to insert straight into the database? Yes, it's always possible to add data into a database. I'd personally advice against it.
If changes are to be made programatically I'd do it via REST API instead of straight into a database.
https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/user
https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/group
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't, and I'd really advice against it.
What do you need to do it via SQL?
What prevents you from doing so via REST calls?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this is the specifications of my team, they would do it only with sql
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I was in your situation, I'd go back to the team and explain why this is a terrible idea.
This would result in downtime of the application for each user insert, risk of inconsistencies, and the need for a complete rollback of the database for any issue.
Is it a recurring task that needs to be done often?
Is it many users at the time?
In case you really want to risk your database and accept downtime every update then go ahead and knock yourself out with the developer reference material https://developer.atlassian.com/server/jira/platform/database-user-and-group-tables/#group-membership to try to find all the right references in the DB.
Doing this via API would get the right info into the right place, it would enable changes to be done without downtime.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your team are wrong, there's no nice way to put that. I would want to question why they think they want to do this in such a bad way.
Tell them what I said above, tell them that it's a long, painful and risky thing to do and leaves them unsupported. Tell them that if (when) it goes wrong, they're going to be blamed for the data loss and the loss of time when you have to roll back. Plus the cost of the time you're wasting having to ask for more here, plus all the time you'll need to write, test and fully understand all the SQL you'll have to write.
Point out that there are fully supported, safe, documented ways of doing this in a couple of lines of code without having 8 hour downtime windows.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you so much for your answer and a advice
and if my team accept to use rest api, is the any addons to install for doing this ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, you don't need anything extra, the REST API is automatically available alongside the UI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.