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

The values entered in custom Fields are not showing during Edit issue

niranjan March 27, 2019

In my environment, i have configured behaviors for few custom fields. But the values entered in those custom fields during create screen are not showing when the user trying to see those values in edit screen. 
I can in view screen but during edit screen the values in those custom fields are not showing up.

Here is the sample code i have written for one custom field.

def PCFRequestType = getFieldByName("PCF Request Type").getValue().toString()
def PCFFoundationName = getFieldByName("PCF Foundation Name")
def OrgName = getFieldByName("Org Name")
def SpaceName = getFieldByName("Space Name")
def PCFFoundationType = getFieldByName("PCF Foundation Type")

def OnboardingType = getFieldByName("Onboarding Type")
def ApplicationType = getFieldByName("Application Name")
def ComponentToBeScaled = getFieldByName("Component to be Scaled")
def RequestedCapacity = getFieldByName("Requested Capacity")
def ServiceType = getFieldByName("Service Type")
def ErrorMessage = getFieldByName("Error Message")
def StepstoReproduce = getFieldByName("Steps to Reproduce")
def TriageStepsAlreadyTaken = getFieldByName("Triage Steps Already Taken")
def ADGroup = getFieldByName("AD Group")

getFieldByName("Buildpack Name").setHidden(true)
getFieldByName("Buildpack Version").setHidden(true)
getFieldByName("Tile Name").setHidden(true)
getFieldByName("Tile Version").setHidden(true)
getFieldByName("User Name").setHidden(true)
getFieldByName("PCF Role(s)").setHidden(true)
getFieldByName("AD Group").setHidden(true)
getFieldByName("PCF Version").setHidden(true)
getFieldByName("PCF Foundation Type").setHidden(true)
//getFieldByName("Space Name").setHidden(true)

OnboardingType.setHidden(true)
ApplicationType.setHidden(true)
ComponentToBeScaled.setHidden(true)
RequestedCapacity.setHidden(true)
ServiceType.setHidden(true)
ErrorMessage.setHidden(true) 
StepstoReproduce.setHidden(true)
TriageStepsAlreadyTaken.setHidden(true)
PCFFoundationType.setHidden(true)
//ADGroup.setHidden(true)

PCFFoundationName.setFormValue(null)
OrgName.setFormValue(null)
OnboardingType.setFormValue(null)
ApplicationType.setFormValue(null)
ComponentToBeScaled.setFormValue(null)
RequestedCapacity.setFormValue(null)
ServiceType.setFormValue(null)
ErrorMessage.setFormValue(null) 
StepstoReproduce.setFormValue(null)
TriageStepsAlreadyTaken.setFormValue(null)
ADGroup.setFormValue(null)
PCFFoundationType.setFormValue(null)
SpaceName.setFormValue(null)

if (PCFRequestType == 'Onboarding')

{ OnboardingType.setHidden(false) OnboardingType.setRequired(true) }

else if (PCFRequestType == 'Increasing Capacity')

{ ApplicationType.setHidden(false) ApplicationType.setRequired(true) ComponentToBeScaled.setHidden(false) ComponentToBeScaled.setRequired(true) RequestedCapacity.setHidden(false) RequestedCapacity.setRequired(true) SpaceName.setRequired(true) }

else if (PCFRequestType == 'New Marketplace Service')

{ ServiceType.setHidden(false) ServiceType.setRequired(true) SpaceName.setRequired(true) }

else if (PCFRequestType == 'Break-Fix')

{ ApplicationType.setHidden(false) ApplicationType.setRequired(true) ErrorMessage.setHidden(false) ErrorMessage.setRequired(true) StepstoReproduce.setHidden(false) StepstoReproduce.setRequired(true) TriageStepsAlreadyTaken.setHidden(false) TriageStepsAlreadyTaken.setRequired(true) SpaceName.setRequired(true) }Capture0.PNGCapture1.PNG

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 30, 2019

xxx.setFormValue(null) is your problem.

You are explicitly telling the behavior to clear our those fields.

TAGS
AUG Leaders

Atlassian Community Events