text: You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.Join group
  Join the community to find out what other Atlassian users are discussing, debating and creating.
  Hi
  I would like that description field content is adjusted based on the checkbox, radio button selection using behaviours
  in scriptrunner.
  All this should happen before Issue is created (using Raise a request).
  I've searched and tested many codes but the field remains empty, whatever I tried to code.
  Thanks for your help
  Hey @Philippe Beltran ,
  Without knowing the code you've already tried I think you should be able to continue based on your previous behaviors.
  In the API quick reference there is specific example for the description field.
  First you need to ge the field of course:
  def cfDescription = getFieldByName("Description")
  but then you can set it like any other normal text field.
  cfDescription.setFormValue("the text you want to set")
  Any chance you could post the exact code you are using?
  I'd be happy to try and reproduce it.
  Here is the simplified code I use to perform test:
  import com.atlassian.jira.component.ComponentAccessor
  import com.onresolve.jira.groovy.user.FormField
  import com.atlassian.jira.issue.customfields.option.Option
  def list1Field = getFieldById(getFieldChanged())
  def list1FieldValue = list1Field.getValue()
  def cfDescription = getFieldByName("Description")
  if (list1FieldValue == "App 4")
  {
  cfDescription.setFormValue("the text you want to set")
  }
  Did some testing myself and seems it isn't willing to work with the getFieldByName
  In my test this works:
  def cfDescription = getFieldById("description")
  cfDescription.setFormValue("TEST THIS IS THE TEST!")
  be sure to keep the "id" case-sensitve :)
  That's weird. I have this code in front of me and just tested it and it works.
  Do make sure the description is in lowercase.
  Is the If clause triggering? If you move it outside of the If does it work then?
  Hi
  No still nothing. I replaced description with summary (as it is also a system field). there it works perfect.
  It's only the description field which is causing trouble.
  Really strange.
  Since the code seems to work fine on my test instance I'm puzzled as to why it wouldn't on your system. Not like it's the most complicated code ever..
  If nothing shows up you might have to see if anybody else has a clue, or open a ticket with Adaptavist ()
  Perhaps something specific to your app version is making it bug out?
  Only setting I could think of would be some permissions on the fields but if you can change it manually the behaviour should be able to as well.
  When I check the field using webtool on chrome I see that textbox is a textbox keyboard focusable but description field have other settings. Not sure if that can be the problem (see screenshots)
  well it will be different as it is a system field and also a multiline instead of a single line.
  Do you see anything in the Console tab?
  You can open up the console first, then check the box and see if anything pops up as warning/error..
  Well my bag of tricks is empty :)
  I'd suggest opening a ticket now and see if something changed with your version or if a bug snuck in..
  On my test system the code works fine so I don't see anymore what we can change
  Thank you very much for your support (even we were unable to fix the problem).
  I will raise a ticket with Adaptavist
  Philippe
  I'm sorry I'm not able to get you to a working solution.
  If they come back with a reason why it's not working I'd love to know what the culrpit was!
  Thank you @Dirk Ronsmans for helping, those are definitely the correct trouble-shooting steps.
  The other thing to check is that you have definitely created a mapping between your behaviour and is the project/issue type(s) , or service desk/request type(s) it should apply to.
  I think you may be creating a ticket with us - great.
  Something else to check is I believe there are plugins that can replace the standard wiki text area that Jira provides with a custom one. In addition, there are entire themes that replace the service desk portal which we can't support due to the nature of this functionality.
  So let us know if you are doing this in the portal view, or if either of those other things apply.
  cheers, jamie
  Hi @Jamie Echlin _Adaptavist_
  The mapping is done and working as when I made test with Summary field instead Description field it works.
  I checked in the plugins and did not see any pointing to wiki text.
  Philippe
  I can see that this is in the JSM portal view.
  I believe this is not working with the new AtlasKit editor that came in the most recent version of JSM. Did you raise a support ticket? If you did can you reference this thread, and we will get this fixed. I'll create a public bug ticket.
  Hi Philippe,
  This appears to be caused by the bug we have listed here:
  We have linked it to this ticket and added you as a watcher so you'll be automatically notified as soon as it's fixed and released. This will most likely be in the next release that goes out.
  If you have follow-up questions or issues to report please let us know through the ScriptRunner for Jira support portal.
  Kind regards,
  Katy
  Adaptavist Product.