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
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You get the status name like this
issue?.statusObject?.name
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mmh, I don't think that the above code is responsible for the error. How do you integrate the script into JIRA? Is the error still there if you remove the integration? Could you paste the complete stacktrace of the error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well it seems that the groovy is now working correct... i packed the same code also in a jql function to verify the listener..
Thanks for your help !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin
You can try using JQL Tricks plugins that provides basic to complicated JQL functions.
Hope it helps!
Cheers :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I already got to this plugin, but imho it does not meet my (current) requirements :(
But it provides cool new jql functions :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Henning
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the previous user and the new selected user are both membersOf("Developers")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi martin,
JQL is "Jira Query Language"
what exactly are you looking for?
afaik plugins can use/access this type of search as well...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.