link between a project and a user

Hello

I would like to switch requested sql to find a link between a project and a user because I want to make space for new users and for now I can not find anything.

thank you for your help

SELECT * FROM `jira5.5.1`.cwd_user;

SELECT * FROM `jira5.5.1`.cwd_group;

SELECT * FROM `jira5.5.1`.cwd_membership;

SELECT * FROM `jira5.5.1`.Project;

Select x.Id,

x.parent_id,

x.child_id,

x.Group_Type,

x.Parent_Name,

x.child_name,

y.display_name,

y.email_address,

z.group_name

From `jira5.5.1`.cwd_membership x, `jira5.5.1`.cwd_user y, `jira5.5.1`.cwd_group z

Where x.child_id = y.ID

and Not(y.email_address like '%******')

and x.parent_id = z.id

Order By x.Child_id,

x.Parent_id;

Select x.Id,

x.parent_id,

x.child_id,

x.Group_Type,

x.Parent_Name,

x.child_name,

y.display_name,

y.email_address,

z.group_name

From `jira5.5.1`.cwd_membership x, `jira5.5.1`.cwd_user y, `jira5.5.1`.cwd_group z

Where x.child_id = y.ID

and Not(y.email_address like '%*****')

and x.parent_id = z.id

Order By x.Parent_id,

x.Child_id;

1 answer

This widget could not be displayed.

Well, the standard warning springs to mind - do NOT try to do this with SQL. It is not safe to manipulate a Jira database without a good solid proven backup, AND Jira completely shut down.

That said, you need to put a bit more thought into this. Users don't have to be directly associated with a project, and you need to think through what you mean by "link between project and user". Do you consider the right to "browse" a project that "link"? If so, you need to read the permission scheme which may define users by group, role, dynamic role (Assignee, reporter, custom field), or even individuals. Users could be directly in roles associated with projects, or your whole user system might be group based.

I think you need to think about what a user/project link is, and tell us what you're trying to do without deciding the method (it may be easier to script or code than using SQL) and then get back to us.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

172 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you