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 vote

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

197 views 2 11
Read article

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