Trying to set assignee on branch creation fails.
Asked by heister82:

The task successfully changes from TO DO to IN PROGRESS but assignee fails with this message:  

"Unknown fields set during transition. Field may not be on transition screen. Fields ignored -Assignee (assignee)"  

I used the "Used who trigger the event" option for the assignee field.  

Any idea why it would fail?  

<br />

edit:BTW I can see the field on the screen (just not on the create branch screen, but I see no way to add that on the create branch screen).


Answers:
author: Gareth Cantrell
body: Hi [@heister82](/t5/user/viewprofilepage/user-id/1686127)

If you want to adjust fields during a transition, you must have a screen attached to the transition with the fields you want changed.

In your case, you will need to have a screen configured with the assignee field and then configure the workflow transition which is used from "To Do" to "In Progress" and ensure it uses this screen.

comments: author: heister82
body: "you must have a screen attached to the transition with the fields you want changed."  

I see no way to do that or even understand exactly what this means...  

I replied the other person with an image on how I configured it...


author: Gareth Cantrell
body: What I mean by this is you need to configure your workflow so that when you transition an issue to In Progress, a screen will pop-up to ask for the Assignee.

You do this in the workflow editor.

1. In this case there is no screen association with the transition to "In Progress".

2. Use the screens section to create a new screen and add the Assignee field to it.

3. Edit the transition and select the screen you created in 2.

Finally, publish the draft workflow.

Now your automation rule will succeed as there is a screen attached to the transition which contains the assignee field.

![Screenshot 2021-01-19 at 15.26.17.png](https://community.atlassian.com/t5/image/serverpage/image-id/126285i9AA12B1E9E0885D5/image-size/large?v=v2&px=999 "Screenshot 2021-01-19 at 15.26.17.png")

You can read more about workflows here: <https://support.atlassian.com/jira-cloud-administration/docs/work-with-issue-workflows/>


author: heister82
body: My screen doesn't look like yours, but I did manage to setup everything and the error is now gone, however the assignee still doesn't work, it remains unassigned with no error messages.  

I created the screen and named it "In Progress" and added the Assignee field:  
![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/126288i818E14F5C4FE6F4B/image-size/large?v=v2&px=999 "image.png")  
I added the screen to the transition:  

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/126289iC4542EC0605EF5D3/image-size/large?v=v2&px=999 "image.png")  

<br />

Log says it worked, but field is still not set...  

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/126290i5B988E09435C8E20/image-size/large?v=v2&px=999 "image.png")  

Transition is OK but not the field:  
![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/126291i4687CEF49B90B794/image-size/large?v=v2&px=999 "image.png")


author: heister82
body: Ok the issue was now that the option "User who triggered the event" doesn't work:  

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/126292i66D7BB6C291CD16E/image-size/large?v=v2&px=999 "image.png")  

<br />

I also tried Automatic and it didn't set, which option should I use to set the assignee as the person that created the branch? (I'm creating the branches inside Jira).


author: heister82
body: Well, it appears it's a known bug...  

[https://jira.atlassian.com/browse/JSWCLOUD-21114](https://jira.atlassian.com/browse/JSWCLOUD-21114?error=login_required&error_description=Login+required&state=86cfe1f7-c5fc-42fd-b5e4-a96e7d7a788e)


author: Gareth Cantrell
body: That makes sense. I wasn't aware you were trying to do this from a Branch trigger.

Those triggers will usually be initiated as the Jira Automation user, which is an app-specific user and which generally cannot be assigned to issues.

Unfortunately, the *{{branch}}* smart value set by the branch trigger does not contain any information about the user that performed the request in BitBucket (or other compatible DVCS system), and in fact, none of the so-called DevOps triggers carry this information.

The only possible workaround would be to use the outgoing web request action to query the information directly from the BitBucket API, although this will involve setting up the correct authentication/authorization beforehand.


author: Aron Gombas _Midori_
body: I'm a bit confused if it is for Jira Cloud or Jira Server/Data Center? (Some screenshot in the topic are definitely cloud, others are not.)

For Data Center and Server, you should use the [Branch Created Trigger](https://midori-global.com/products/better-devops-automation-for-jira/data-center/documentation/automation-triggers#branch-created-trigger) which makes the branch creator available through the smart value *{{devops.initiator}}*.

Here is a recipe that show [how to assign an issue to the committer](https://midori-global.com/products/better-devops-automation-for-jira/data-center/documentation/issue-operations/updates#assign-to-committer). It may be exactly what you need or the script may need some tweaking.

![devops-automation-rule-branch-created](https://community.atlassian.com/t5/image/serverpage/image-id/137931i0BDFDA7739A53813/image-size/large?v=v2&px=999 "devops-automation-rule-branch-created")

comments: author: heister82
body: I don't know what do you mean by "Data Center", I'm only using Jira.  

The bug I had is known:  
<https://jira.atlassian.com/browse/JSWCLOUD-21114>


author: Aron Gombas _Midori_
body: Jira supports 3 types of deployment: Server (legacy self-hosted), Data Center (modern self-hosted) and Cloud. Like I wrote this was a bit confusing which one you are using, but it seems you are sure that you are using Cloud.


author: Martin Bayer _MoroSystems_ s_r_o__
body: Hi [@heister82](/t5/user/viewprofilepage/user-id/1686127) can you post screenshot of the automation configuration? Are you on classic or next-gen project?

comments: author: heister82
body: Classic project.  

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/126281i771691958AF296D1/image-size/large?v=v2&px=999 "image.png")