Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-28354

Use JIRA user name instead of JIRA user key

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.4, 2.4.4, 3.0.0
    • Fix Version/s: 3.0.0
    • Component/s: Project Infra
    • Labels:
      None

      Description

      `dev/merge_spark_pr.py` script always fail for some users (e.g. Yuming Wang) because they have different `name` and `key`.

      JIRA Client expects `name`, but we are using `key`.

          def assign_issue(self, issue, assignee):
              """Assign an issue to a user. None will set it to unassigned. -1 will set it to Automatic.
      
              :param issue: the issue ID or key to assign
              :param assignee: the user to assign the issue to
      
              :type issue: int or str
              :type assignee: str
      
              :rtype: bool
              """
              url = self._options['server'] + \
                  '/rest/api/latest/issue/' + str(issue) + '/assignee'
              payload = {'name': assignee}
              r = self._session.put(
                  url, data=json.dumps(payload))
              raise_on_error(r)
              return True
      

      This issue fixes it.

      -                asf_jira.assign_issue(issue.key, assignee.key)
      +                asf_jira.assign_issue(issue.key, assignee.name)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dongjoon Dongjoon Hyun
                Reporter:
                dongjoon Dongjoon Hyun
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: