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

0 votes

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,811 views 11 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot