Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Set field value in Create Issue Form based in another field

Mattias Kallvi
Contributor
June 12, 2019

I have two fields, "POC User" and "POC TextField". What I want is when "POC User" is updated I want to add some text to "POC TextField", for example current time (or some other dummy value).

I have tried using Behaviours and I can see that the script I have runs but it won't update the "POC TextField" in the form. Anyone who has done something like this? Can it be done?

This is just a POC to see if and how it can be done. If it works we will put some more advanced logic on it. Our goal is to pull in some data to the field but it must be editable to the user, otherwise we might have used "Scripted fields".

1 answer

0 votes
Mattias Kallvi
Contributor
June 12, 2019

Well, I think I might have found the solution. My field name had swedish special characters and using the getFieldByName seems to return 'null' (maybe an encoding issue?). Since no exception was thrown setting the field I thought it was working. Using getFieldById instead works much better. Will try to remember to always use that one :-)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events