Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Manage filter with owner's name not working in 7.1.9 version

Prathyusha April 3, 2018

Hi Team,

User has this issue with the saved filters:
User has hundreds of filters, shared with everyone, but since some weeks, we can see only 2 of them when searching by Owner.
When we actually search in the total list of filters, we find many filters with the Owner name and shared with everyone.

This issue is with many users not with single user.

Please suggest me the possible solution to rectify the problem.

1 answer

0 votes
Andy Heinzer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 6, 2018

I would recommend trying to follow the KB JIRA get list of all filters shared with everyone.  It explains how you can use SQL queries against the Jira database in order to figure out the specific user account that owns each filter that might be shared with 'everyone'.   From that KB, this SQL query is:

// get list of filters which has share type as "share with everyone" (i.e. global)
SELECT sr.filtername, sp.sharetype AS current_share_state, sr.username AS owner_name, sr.reqcontent AS JQL
FROM searchrequest sr
INNER JOIN sharepermissions sp ON sp.entityid = sr.id 
WHERE sp.sharetype='global' and sp.entitytype ='SearchRequest';

In turn this should return the Jira username in the 'owner_name' field of that query.   From reading your description, I suspect that this user might actually have more than one user account in Jira, because if they are logged in to Jira, but cannot see these filters as their own, then having more than one account with a similar or the same Display name could be one way this might happen.  I cannot explain otherwise how this might happen if they actually only have a single account in Jira and cannot see these.

Prathyusha April 11, 2018

Hi Heinzer,

Thanks For sparing some time for us,

we tried to implement the solution suggested by you but the outputs are not as expected, we got the list of all the filters shared globally and owned by different people.

Filter issue.PNG

For security reasons i have shaded the user ID

We want to list all the filter that are shared with everyone which are owned by the particular user using filters (Find Filters)

There were no dulicate users accounts has checked it

Please suggest us a solution for this.

Thanks In Advance

Andy Heinzer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2018

Edit: August 21, 2019 - Found out that the searchrequest table is not using the current username of that account, but rather the app_user.user_key field to identify this.  It users this because that value is unique and persistent across Jira.  As such the old answer could work, but only for accounts that have never been renamed within Jira, this comment below has been updated to reflect a more encompassing set of users (ie both user renames and original user account names).

 

You can just adjust the SQL to look for a specific user's filters that are shared globally:  

// get list of filters which has share type as "share with everyone" (i.e. global)
SELECT sr.filtername, sp.sharetype AS current_share_state, sr.username AS owner_user_key, sr.reqcontent AS JQL
FROM searchrequest sr
INNER JOIN sharepermissions sp ON sp.entityid = sr.id
join app_user au on au.user_key = sr.username
WHERE sp.sharetype='global'
and sp.entitytype ='SearchRequest'
and au.lower_user_name = 'exampleusername';

In that example, you can just replace the exampleusername with the current username in Jira of the account you want to find.    This should return all such filters that have been shared globally by that specific account. 

Prathyusha April 16, 2018

Hi Andrew,

Thanks for the SQL Query!!

Its working fine for us to filter the Filters shared with everyone and geting the correct output, We have tried to get the saved filters with the owner/User: xxxxx by using the below SQL Query execution and got the result with 152 filters.

But again we we have trying with Manage Filter -> Search Filter -> Owner (xxx)  the filter  as expected. We are trying to find the issue in GUI side.

Please suggest to solution from end user prospective to filter the issues from Manage Filters.( UI )

 

screenshot-4.png

Currently we are using 7.1.9 Jira version, Let us know if there is any problem with this version of Jira in Managing Filters. 

Thanks in Advance.

Andy Heinzer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2018

7.1.9 is one of the last versions of Jira that has the option to share a filter with the entity called 'anyone'.   In 7.2 and later version of Jira do not explicitly use that term.  Instead 7.2 and higher have the option to use the 'Any logged in user' instead.   This is more clear in regards to which users are being shared the filter.

I would recommend reviewing the KB Anonymous users able to see shared filters dashboards or project issues.  This KB explains more details about this scenario.  Because older versions of Jira would let you share filters with anonymous users, it was possible to share these with truly Anyone, which includes anonymous users in this version of Jira.

 

I understand you have a discrepancy between the SQL and what the Jira UI shows.  I would be concerned with the specific value you have entered there for 'owner'.  That looks like a full or displayname.  Typically I would expect Jira to use a username value instead, such as msagrioti instead of the Lastname, firstname convention.   But if you are sure you have the correct name for the owner field and are still not seeing these, I would still instead recommend using the SQL method as that KB recommends as well.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events