Setting a custom field value

Is it possible to set a custom field value on a transition screen using the behaviours plugin server side script and the function - formField.setFormValue(value)?

I want to set a custom field to the current/logged in user.


2 answers

Yes it is possible , But i would advice you to test if it works .for me formField.setFormValue(value)

did not work for priority field.

so what would the syntax actually be?

Something like : form<cf value>.setFormValue(current_user)?

You will need to get the current user first the set the value using username

What is the syntax for that also?

I have the same issue, someone know the exact syntax i could use for that ?

It is to populate on the next transition, so storing the previous user on last transition would be a problem with this solution.

I didn't understand. You need the value for the current user who is doing the operation to be filled in a custom field so that it gets stored. That is exactly that post function also is doing.

The problem is the user doing the transition is not the one who did the last action ie the one that would be populated as current user on a post function - the next user then picks up the issue, at this point I want the field to get populated.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,703 views 3 11
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you