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

Renaming a user prevents user picker field from being set with behaviours in JSD portal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Minor
    • Resolution: Fixed
    • 5.4.28
    • 5.4.42
    • Behaviours
    • None
    • JSD 3.15.1

      JIRA 7.12.1

    • Sprint 43
    • 1

    Description

      Steps to Reproduce

      Create a simple script to set a user picker field in a behaviour initialiser. This behaviour should be mapped to a JSD project:

      import com.atlassian.jira.component.ComponentAccessor
      import com.atlassian.jira.user.ApplicationUser
      
      def userManager = ComponentAccessor.getUserManager()
      def admin = userManager.getUserByKey("admin")
       
      def f = getFieldByName("SingleUserPickerA")
      
      log.debug(admin.name)
      f.setFormValue(admin.username)

      Attempt to raise a request. The issue is created successfully:

      Change the user's username through the JIRA user management page and try to raise a request again. Despite the user picker field being filled out correctly, the issue can't be created because the field contains the previous username and not the new one.

      It's not immediately clear how the old value for the username keeps getting set. Logging statements within the script show that the new username is available, and the field appears to be getting the correct avatar, but the issue simply can't be created because the actual value for the field is incorrect.

      Manually typing the user's new username works correctly.

      This problem does not occur when issues are created from the non-portal, regular JIRA Service Desk project agent view.

      Attachments

        Activity

          People

            rholban Roland Holban [X] (Inactive)
            jyamdogo Josh Yamdogo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: