How to find issues for a user that are present in group custom field in JIRA sql

 

15 answers

This widget could not be displayed.

The custom field is of type Group Picker or a Multi User Picker?

This widget could not be displayed.

That customfield is group Picker

This widget could not be displayed.

Hmm, I don't think that this is possible. But maybe someone knows it better.

This widget could not be displayed.

Could you please help it's urgent

This widget could not be displayed.

Do you know the groups the particular user is in, then use

YourCFGroupPicker in (GroupA, GroupB,...)

That would be my only idea.

This widget could not be displayed.

assignee in membersOf("groupname")

This widget could not be displayed.

Actually we added  groups to a custom-field. so we want to use the customfield not group name. Is that possible?

This widget could not be displayed.

I doubt that you can use something like

assignee in membersOf("<YourGroupCustomField>")

This widget could not be displayed.

I am using like currentUser() in memeberOf("group field name") but that is not working.

This widget could not be displayed.

Can you tell us what your requirements are (without how you are trying to achieve it), maybe we can help. The JQL you want will not work.

This widget could not be displayed.

We added a group to custom field for some issues and then we are trying to search issues for a particular user, the user is present in the group that added to the custom field but we are unable to find issues with the function currentUser().

This widget could not be displayed.

currentuser() will only work for user picker fields like

assignee = currentuser()

I still don't understand what your requirements are! What are you trying to achieve (and step back from your current solution)?

This widget could not be displayed.

ok.. So for group picker field how we will use currentUser() function or tell me how the users of that group which is present in group custom field can see the issues

This widget could not be displayed.

currentuser() will not work on group picker.

If the user knows in which groups he is (like GroupA and GroupB) use

YourCFGroupPicker in (GroupA, GroupB)

This widget could not be displayed.
Vasiliy Zverev Community Champion Feb 23, 2016

I can propose two work arouds:

  1. To use this SQL:

    Select
    	customfield.cfname
    	, customfieldvalue.*
    	, cwd_group.*
    	, cwd_user.display_name
    from
    	customfield
    	join customfieldvalue	
    		join cwd_group	
    			join cwd_membership 
    				join cwd_user on	cwd_membership.child_id = cwd_user.ID
    			on cwd_group.ID = cwd_membership.parent_id
    		on customfieldvalue.STRINGVALUE = cwd_group.group_name
    	on	customfield.ID = customfieldvalue.CUSTOMFIELD
    where
    	customfield.cfname = 'группы'		--here is custom field name
    	and cwd_user.user_name = 'vzverev'	--
  2. To create a Script custom field provided Script Runner plugin.

 

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...

201 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