Setting assignee during post function to create issue

Jeanne Howe December 2, 2022

We have a post function set up using JMWE to create an issue in another project when the trigger issue transitions to a specific date.

 

The new issue has several required fields on create. I have been able to get all of the fields set with the exception of the Assignee field.

No matter how I try to set it, e.g. copy form current issue, set a groovy expression, I am getting an error on transition stating the Assignee field must have a value to create the issue.

 

How do I set the Assignee field to a specific user when creating an issue via a post function using JWME create issue?  Ideally, I would like to use a groovy expression to set the Assignee to a specific user.

1 answer

1 accepted

2 votes
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2022

Hi @Jeanne Howe ,

can you share the post-function configuration, as well as the exact error message you're getting? Setting the Assignee field should be done the same way other fields are.

To set the assignee to a specific user, select "Set to constant or Groovy Template" and specify the username (login name) of the assignee (without quotes or anything).

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2022

And also make sure the Assignee field is present on the Create screen of the issue being created. 

Jeanne Howe December 2, 2022

Wow, what a fast response!

Thank you David.

I was able to get it working using a groovy expression:

assignee:"ecarroll"

 

Would I be better off using a Groovy Template?

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2022

No, using Groovy Template instead just allows you to remove the double quotes :) 

Suggest an answer

Log in or Sign up to answer