Hi,
I want to write a jelly script to do a workflow transition similar to the example at http://confluence.atlassian.com/display/JIRA044/Jelly+Escalation .
At this script the filter id is hardcoded - how do I get the filter id by name within the jelly script?
Thank you,
Andi
You can't get filter by name because a lot of users can create filters using the same name. SearchRequestService has a few methods to get filters by user etc. but I couldn't see any Jelly tags for that!
Filter name is not unique, and attempt to do programmatic stuff in jelly seems painful to the point of wondering why you wouldn't use groovy or another scripting language, but anyway, I'd stick with the ID.
If you want to do it you need com.atlassian.jira.issue.search.SearchRequestManager#getSearchRequestById(User user, Long id)
The args about missing uniqueness are ok, I already knew this but I needed a way to get the right id once without any programming Java... .
I found a way: I made a system backup => xml-file and searched for the right object. The id is easily pickable at the xml code. Not nice but solving the issue.
You can find the id from JIRA itself. Go to 'Manage Filters' and click on a filter. You will find the id at the end of the url.
https://localhost:8080/secure/IssueNavigator.jspa?mode=hide&requestId=12613
It looks like you're new here. Sign in or register to get started.