Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Json response parsing, passing string to AtlassianDocumentFormat constructor. #84

Open
Luke-Arch opened this issue Jul 8, 2024 · 0 comments

Comments

@Luke-Arch
Copy link

JiraCloud\ADF\AtlassianDocumentFormat::__construct(): Argument #1 ($document) must be of type DH\Adf\Node\Block\Document|DH\Adf\Node\Node, string given, called in /var/www/html/vendor/netresearch/jsonmapper/src/JsonMapper.php on line  
   706

Thrown by implementation, on line 9 below (getBoardIssues call). Which appears to happen when parsing a multiline description field, when fetching board issues.

        $projectService = new ProjectService();
        $p = $projectService->get('TEST');

        //Get project boards
        $boardsService = new BoardService();
        $bs = $boardsService->getBoardList(['projectKeyOrId' => $p->id]);

        foreach ($bs as $b) {
            $issues = $boardsService->getBoardIssues($b->id, [
                'maxResults' => 10,
            ]);

            $data = [];

            foreach ($issues as $issue) {
                $data[] = [
                    'id' => $issue->id,
                    'key' => $issue->key,
                    'name' => $issue->fields->summary,
                    'description' => $issue->fields->description,
                ];
            }
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant