I'm currently working on replicating JIRA's functionality in Salesforce where users can comment and attach files. In JIRA, when attaching a file to a comment, the file must first be uploaded. I'm wondering if the same workflow is achievable when using the JIRA REST API in Salesforce.
Thus far, my research has led me to separate API calls for adding comments and attaching files, but I haven't found a method that combines both actions into a single operation. Can anyone provide insight or direct me to a resource that could assist with implementing this feature? What document format should be used to create comments with attachments?
Hello @Melvin Corbes ,
Is your question related to Salesforce or Jira?
If Salesforce you will get better answers from the Salesforce community.
If Jira, cloud DC or server?
This is done in two steps.
1. Upload file
2. Add comment. The comment can reference an attachment in the issue.
Remember there are configurations about what a server will accept in attachments. eg amount of attachments and size.
How are you 'replicating' this? The responsibility falls on the author of the functionality to decide how to implement the API provided by the vendor in this case the Atlassian REST documentation is quite useful. Make sure you are reading the documentation for the version of the application you are integrating into.
Hello @Graham Twine the above screenshot is what I want to achieve using the REST API
"body": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Comment with files"
}
]
},
{
"type": "mediaGroup",
"content": [
{
"type": "media",
"attrs": {
"id": "49ae84a6-dc23-4d03-96e9-5b6eaafb9b10",
"type": "file",
"collection": ""
}
}
]
},
{
"type": "paragraph",
"content": []
}
]
}
I encountered an error with the message "Bad Request {"errorMessages":["INVALID_INPUT"],"errors":{}}".
I believe the issue lies with the JSON format that I used. I would greatly appreciate your guidance in providing the correct format for achieving my goal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.