Skip to content

IssueService::getCustomFields() does not get custom fields #526

@AlexHowansky

Description

@AlexHowansky

The method IssueService::getCustomFields() appears to have been cut-and-pasted from the immediate preceding method getPriority(). It takes the wrong arguments, hits the wrong endpoint, and returns the wrong data. It looks like it should be hitting the field endpoint instead:

--- a/src/Issue/IssueService.php
+++ b/src/Issue/IssueService.php
@@ -831,7 +831,7 @@ class IssueService extends \JiraRestApi\JiraClient
      */
     public function getCustomFields(int $priorityId): Priority
     {
-        $ret = $this->exec("priority/$priorityId", null);
+        $ret = $this->exec('field');
 
         $this->log->info('Result='.$ret);

There is likely also a change that needs to be made to the subsequent json_mapper call, but I am not entirely sure what that should look like.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions