Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-5624

Behaviour clear Description field with setFormValue("") and setFormValue(null) do not work in JSD Customer Portal



    • Bug
    • Status: Done
    • Low
    • Resolution: Done
    • 6.38.0
    • 6.44.0
    • Behaviours
    • SR4J Sprint 115
    • 2.2


      To clear the Description field with setFormValue("") and setFormValue(null) using Behaviour, and none of these are working in the JSD Customer Portal create request form. 

      However, it is working well in the Jira Create Issue screen. 

      Steps to Reproduce

      1. Create a Behaviour and map it using project/issue type mapping and the Service Desk mapping.
      2. Apply the below snippet into the Summary field server-side script and save:

      if(getFieldById(getFieldChanged()).getValue() == "a"){
          getFieldById("description").setFormValue("summary is a")

      Jira Service Desk Customer Portal - Request Form

      3. Navigate to the Customer Portal > Select a request form > Enter "a" in the Summary field > The Description field is pre-filled with "summary is a".
      4. Enter something else other than "a" in the Summary field.

      Expected Behaviour

      The Description field is being cleared or emptied now.

      Actual Behaviour

      The Description field is NOT being cleared.


      Alternatively, you can clear the Description field in the customer portal request form using the below code:

      getFieldById("description").setFormValue(" ")

      To clear the Description field with a blank space (" ").

      Additional Info

      • Jira Service Management Version: 4.16.0
      • The behaviour works fine on Jira Create Issue Screen

      1. Navigate to the Jira Service Desk project > Create > Enter "a" in the Summary field > The Description field is pre-filled with "summary is a".
      2. Enter something other than "a" in the Summary field > The Description field is being cleared.

      • Attached is a screen recording shows the steps to reproduce the issue.
      • Neither setFormValue("") nor setFormValue(null) is working in clearing the Description field in the customer portal request form.
      • Do note that this bug doesn't occurs on a Text Field, it only occurs on Description Field


        Issue Links



              wsignoretti Wagner Signoretti
              jpang JJ Pang
              0 Vote for this issue
              3 Start watching this issue