Forums

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

Why won't Scriptrunner enhanced search return complete results?

ChinnoDog June 12, 2023

I have a Scriptrunner query on a project that is synced and shared with everyone and is used on a board. For the user that created it this works fine. Other users can see the correct results when opening the scriptrunner query on the project but the synced filter used on the board returns incomplete results.

  • The project uses a permission scheme that causes issues to be visible only to the reporter and assignee.
  • atlassian-addons-project-access has all permissions in the permission scheme.
  • The synced query contain the search results that are visible to the user that created it. This means that when another user views the synced query it complains that some issues named in the query don't exist.

I thought the queries ran as the plugin user but this result suggests otherwise. Can I get the query to run in a way that either captures all results or results that apply to the user viewing the board?

2 answers

0 votes
Trudy Claspill
Community Champion
June 12, 2023

Hello @ChinnoDog 

Can you show us the query you created?

How are you using the filter in the board? Is it used as the base filter for the board or as a Quick Filter?

ChinnoDog June 13, 2023

This is my query:

issueFunction in subtasksOf("statusCategory = 'To Do'")

The purpose of this query is to find subtasks of issues that are not started yet. I use this in the board sub-filter by appending 'AND filter != 10136'. The effect is that subtasks of issues that aren't started don't appear on the board.

Trudy Claspill
Community Champion
June 13, 2023

Can you confirm you are using a Kanban board?

Is 10136 the ID for the filter you created in ScriptRunner (the query you have shown)?

What is the base filter for the board?

Can you show us the complete sub-filter for the board?

When the filter is used on the board you said it returns "incomplete results". Can you provide details about how the results don't match your expectations? Are issues being displayed that you think should be excluded? Are issues being excluded that you think should be displayed? Can you provide details about those issues (type, status)?

0 votes
Evgenii
Community Champion
June 12, 2023

Hi, @ChinnoDog 

You need to refactor script, set there user, under whom rights you want to execute query.

Don't know, how exactly you create custom query, but maybe this can help:

ComponentAccessor.jiraAuthenticationContext.setLoggedInUser(ApplicationUser user)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events