Closed wimg-bstuckey closed 2 years ago
I think im reading jira api docs right https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-post
var bodyData = `{
"visibility": {
"type": "role",
"value": "Administrators"
},
"body": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.",
"type": "text"
}
]
}
]
}
}`;
const response = await api.asApp().requestJira(route`/rest/api/3/issue/{issueIdOrKey}/comment`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
and this is what the current SDK is sending JsonData={"body":"TEST",
where body is just a string... i guess what i am saying is it looks like it is a V2 vs V3 issue... but seems like it maybe an easy thing to hack real quick locally until a CommentV3
is made like DescriptionV3
ooo was just searching the code and see lesstif/php-jira-rest-client/src/Issue/CommentV3.php
@wimg-bstuckey sorry I'm late, could you resolve your issue?
@wimg-bstuckey sorry I'm late, could you resolve your issue?
Sorry, i forgot to come back and mark this as resolved. Once i found CommentV3 it worked just fine :)
here is my code
not quit sure what is wrong with my comment body... i am using v3 for the rest of my api functions before this... is this an issue with v2 vs v3?
here are some logs