i am trying to build an app where i am trying to transition the status of an issue and when user tries to change status if an issue i am displaying a popup which displays the fields like we have in transition screen and i am trying to add attachment to the issue but i am unable to add attachments
Could you please provide a bit more detail about how you're trying to add the attachment? For example, are you using the REST API, Forge, Connect, or some other method? Also, sharing any relevant code snippets or error messages would help in understanding the issue better.
Hello sir @Tuncay Senturk _Snapbytes_ i am working on forge
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Do you see any error logs in the console or the Forge tunnel output?
What’s the exact behaviour you're observing — is uploadFilesToJira
being called successfully?
Also, are you seeing a response from Jira’s /attachments
API, or is it failing silently?
You have to provide more information :)
By the way Atlassian developer community might be the better place to ask this sort of questions as you will find more answers there
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @Tuncay Senturk _Snapbytes_ i am getting this error Error uploading files: FetchError: invalid json response body at https://jira/rest/api/3/issue/10361/attachments reason: Unexpected end of JSON input this is my resolverfunction
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @Tuncay Senturk _Snapbytes_ i am bale to add the attachment but do we get something like temporary attachment because i cant see that in response that i am getting after adding the attachment
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I'm confused. Are you getting invalid json error or are you able to ad the attachment?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tuncay Senturk _Snapbytes_ i am trying to build a forge app where i am displaying some issues and i am also displaying status of the issues when user tries to move a issue from To Do to in progress i am trying to replicate a transition screen where user has to fill some required fields before changing the status of the issue we also have a field to upload attachment in that screen so i have created two functions one for uploading the attachment it is working attachment is being added but my tranisition function throws an error about attachment
this is the error i am facing Error transitioning issue: Error: Failed to transition issue: 400 Bad Request. {"errorMessages":[],"errors":{"attachment":"Temporary attachment not found. Session may have timed out before submitting the form."}} this is my transition function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see, you upload correctly but the transition API call fails due to temp attachment ID.
I'd suggest uploading the attachment using asUser()
instead of asApp()
— since the transition call is made via asUser()
, Jira expects the attachments to be uploaded by the same user session in order to see the attachment ID in the same transaction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.