I need to setup a filter, where the jql is something like:
developer = currentAssignee()
I was not able to find any plugin which contains such a jql function
Regarding your problem you could write a listener using Script Runner plugin which detects changes of the aforementioned custom fields and changes the assignee respectivly. See https://jamieechlin.atlassian.net/wiki/display/GRV/Listeners on how to implement a listener.
You could implement a general test if the assignee matches the custom field content (regarding the current situation of the issue) or you can directly look into the event to see, if one of the customfields were changed (e.g. event?.changeLog?.getRelated('ChildChangeItem')?.any{ it.field=='assignee' } to see if the assignee was changed, customfields should work similar).
Henning
hi martin,
JQL is "Jira Query Language"
what exactly are you looking for?
afaik plugins can use/access this type of search as well...
If "developer" is a group in your JIRA system you could write
assignee in membersOf("Developers")
If it's a role there is no such function out of the box. Maybe you can use the Script Runner plugin and write your own JQL function for this.
the previous user and the new selected user are both membersOf("Developers")
well because of the required setup we have 4 custom user picker fields which are filled by role definitions: CB, Development, Integration, Verification
Those 4 custom fields are used to set the assignee within the workflow ( depending on the current action in a post-function ) . If somebody changes the selected user of e.g. Development the assignee is not udpated to the selected value. the previously chosen user is still the assignee.
Now i tried a workaround of problem using a Jelly Service and a filter like this one
state in ( "in development", "product test" ) and development != currentAssignee()
The Jelly Service should call this filter and update the current assignee to the user defined in the custom field "development".
But a function like this does not exist. I already wrote a custom plugin, but not for jql ...
Hi Martin
You can try using JQL Tricks plugins that provides basic to complicated JQL functions.
Hope it helps!
Cheers
I already got to this plugin, but imho it does not meet my (current) requirements
But it provides cool new jql functions
Yes that's my problem - and edit's can not be "catched" to update / define some functions on it.
This Setup is mainly because our users are used to work this way and they do not want to change it
Ok, now with your comment this doesn't help you. If I understand correctly, the custom fields are user picker custom fields, correct? And you want to update the assignee if one of these customfields are changed?
Hi,
You can add a custom field "User Picker" and you initialize it when the developer do some changes on issue; and the User Picker = current Assignee() will work.
I got the logic ( status depending custom field ) running using the script console, but when i try a groovy listener - i get an exception:
java.lang.RuntimeException: No such property: Status for class: com.atlassian.jira.issue.IssueImpl
And that occures on this class:
import com.atlassian.jira.event.issue.AbstractIssueEventListener import com.atlassian.jira.event.issue.IssueEvent class AssigneeUpdateListener extends AbstractIssueEventListener { @Override void workflowEvent(IssueEvent event) { } }
You get the status name like this
issue?.statusObject?.name
I am not getting the status at this time - the definition of the listener is empty. So i do not understand why the exception occures in the jira log files
It looks like you're new here. Sign in or register to get started.