Closed lucasaba closed 2 years ago
Editing src/Issue/IssueFieldV3.php
and adding the following method (really a ugly code....):
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$result = parent::jsonSerialize();
$result['description'] = $result['descriptionV3'];
unset($result['descriptionV3']);
return $result;
}
solves the issue.
Hi @lucasaba, Thank you for your comments.
I changed the code based on your suggestion, could you check the code works well, please?
Hi @lesstif , works like a charm! Thank you very much!
I'm trying to create a new Issue. I'm a cloud user and using V3 of the API.
I tried to add the description to the IssueField but Jira says that
description":"Operation value must be an Atlassian Document (see the Atlassian Document Format)
. I then tried with IssuFieldV3.Now it says
"descriptionV3":"Field 'descriptionV3' cannot be set. It is not on the appropriate screen, or unknown."
I'm using v4.0.4 of
php-jira-rest-client
and PHP 8.1.2.Could I try to "force" to use "description" label in
DescriptionV3
serialization ?