Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Trying to set assignee on branch creation fails.

Edited

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?


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).

3 answers

1 accepted

2 votes
Answer accepted

Hi @heister82 

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.

"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...

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

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

Like heister82 likes this

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
I added the screen to the transition:

image.png


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

image.png

Transition is OK but not the field:
image.png

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

image.png


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).

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.

1 vote

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 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. It may be exactly what you need or the script may need some tweaking.

devops-automation-rule-branch-created

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

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.

Hi @heister82 can you post screenshot of the automation configuration? Are you on classic or next-gen project?

Classic project.

image.png

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Automation

New to Jira Automation - goodbye Cron (sort of), hello new project created trigger, new additions to

Hey Everyone! Simeon from the Automation team here. I'm delighted to share some new features and improvements that we are shipping to Jira automation (Cloud only). Firstly, @Sam Harding&nbsp...

2,879 views 10 23
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you