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

Next challenges

Recent achievements


  • Give kudos
  • My kudos


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Copy Components field to custom field

Hi guys,

Im trying to create script, that will assign issues later in workflow based on Component/s (no connection with Component Lead). Main issue is, that copying the value to custom field doesnt work as expected. When im trying to copy the value to Single Choice List field, there is no change in that field (value is None) - Single Choice List has choices exactly as they are in Component/s, tried with "test" as component too. When im trying to copy the value to Single Line Text field, the value is copied but i cant use the value in text field to assign ticket (nothing happens with the assignee) - im using script that is working on another workflows. Can someone help me find solution how to copy Component/s value to field that will be used for changing assignee or how to use Component/s directly to assign issue to user? There is only one component in Component/s field everytime.


1. Create Issue

2. Issue assigned to Component Lead for Approval

3. After Approval, in this step the issue should be assigned based on Component

1 answer

Hi @Dominik Vavra,

one way to resolve this would be via a script add-on (e.g. Powerscripts for JIRA).

Let's say you are in status "Open", component = "test" and your component lead transitions the issue to "In progress". On the transition you could add a simple script to your post function in the workflow, so it would be automatically assigned to "mrpower".

1. Create a post function via SIL script like this:

if (elementExists(components, "test")) {
assignee = "mrpower";
if (elementExists(components, "component xyz")) {
assignee = "jsmith";

 2. Add the script to your workflow's postfunction

This should work really well.

Let me know if it's working for you.

Best wishes
Chris (STAGIL)

Hi @Christopher Jaksch,

thank you, its working as expected :)

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

3,996 views 11 5
Join discussion

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