You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hey,
We have some criteria for Filters to be deleted in our Jira Instance.
Could anyone help with Script in Scriptrunner for below?
We need to create a script that delete filters which fall under these criteria:
or any idea is welcome.
Regards,
Anuradha
That is a pretty big ask.
I would start by reviewing this post
Jira questions Bulk-Delete-Issues-Using-ScriptRunner
Work on a base from there and many of us can help beyond that.
Hi @CJ Edwards ,
Thanks but the post you gave is for issues right? not for Filters.
I tried below Script:
But seeing some errors. Could you please help?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anuradha,
I would work from the top of the script to narrow the problems.
- getAllUsers() was deprecated long ago. Use UserSearchService.findUsers() use https://docs.atlassian.com/software/jira/docs/api/9.8.1/com/atlassian/jira/bc/user/search/UserSearchService.html
- for filter work use - com.atlassian.jira.bc.filter - Interface SearchRequestService
The error listed in your picture is from passing DelegatingApplicationUser instead of ApplicationUser that the function is expecting.
I hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you have success using ScriptRunner to bulk delete filters?
I'm working on a project where I need to delete all the inactive users's filters or delete them by their filter id.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.