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

Display value of selected option in LDAP Picker Script Field



    • Bug
    • Status: Done
    • Low
    • Resolution: Done
    • 6.15.0
    • 6.18.0
    • Script Fields
    • None
    • SR4J Sprint 90
    • 0.7



      The display value of the option in a LDAP Picker Script Field when selected is different from the format that the attributes have been configured to appear via the Configuration Script.

      Steps to Reproduce the Problem


      • LDAP directory server set up with user information

      • LDAP connection set up in the Resources tab

      1. gg > input 'Script Fields' > hit enter
      2. Click on 'Create Script Field' > select 'LDAP Picker Field'
      3. Fill in the key information as shown here > click 'Add'

      Search Filter


      Configuration Script

      import org.springframework.LdapDataEntry
      renderViewHtml = { String displayValue, LdapDataEntry ldapDataEntry, boolean active ->
          "${displayValue} (${ldapDataEntry.attributes.get('l').get()})"
      renderOptionHtml = { String displayValue, LdapDataEntry row ->
          "${displayValue} (${row.attributes.get('l').get()})"

      4. Click on 'Configure Screens' & select relevant screen to associate the script field with > Click 'Update'
      5. Edit an existing issue/create a new issue
      6. Click on the LDAP Picker field to expand the drop-down list. Note that the display value in the drop-down list is common name (location).
      7. Select an option from the drop-down list. Note that now the selected option is displayed just as common name, without the location.

      8. Click on 'Update'. Note that on the issue view screen, the display value is common name (location)

      Expected Behaviour

      The display value of the selected option in LDAP Picker Script Field appear consistent with the format that the attributes have been configured.

      Actual Behaviour

      The display value of the option after being selected follow the value in Display attribute field.
      For example:
      Display attribute = cn; selected option: James Bond
      Display attribute = l; selected option: Secret Location

      Additional Info


        1. Attribute Users.png
          Attribute Users.png
          201 kB
        2. Configuration Script Comparison.png
          Configuration Script Comparison.png
          703 kB
        3. LDAP connection.png
          LDAP connection.png
          163 kB
        4. LDAP Picker Field.png
          LDAP Picker Field.png
          230 kB
        5. Selected option display value.png
          Selected option display value.png
          590 kB



            jechlin Jamie Echlin
            wkoh Winnie Koh
            0 Vote for this issue
            3 Start watching this issue