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

[AXON 95] Fix file attachment to jira tickets #93

Merged

Conversation

marcomura
Copy link
Contributor

The root of the issue was the inability to retrieve the absolute path of the picked file from the file picker, which probably it's done for security reasons, and the subsequent attempt to read the file from a path that we don't have.

Originally, the file was read from the controller, which receives the file info from the view via post message.

After the fix, the file is read by the view before the post message, and the controller receives the file content along with the file metadata.

Tested:

  • Jira cloud, attaching files to existing jira ticket
  • Jira DC, attaching files to existing jira ticket
  • Jira DC, attaching files during a jira ticket creation

Copy link
Member

@sdzh-atlassian sdzh-atlassian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding tests for the new util files? Otherwise, looks good to me :)

src/util/files.ts Show resolved Hide resolved
@marcomura marcomura changed the title Fix file attachment to jira tickets [AXON 95] Fix file attachment to jira tickets Feb 5, 2025
Copy link
Member

@sdzh-atlassian sdzh-atlassian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ship it! 🚢🇮🇹

sdzh-atlassian
sdzh-atlassian previously approved these changes Feb 6, 2025
Copy link
Collaborator

@bwieger-atlassian-com bwieger-atlassian-com left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some performance enhancements.

Happy to ship "good" and then make it "better"

@marcomura
Copy link
Contributor Author

Some performance enhancements.

Happy to ship "good" and then make it "better"

I believe it's already "best" 😆

@marcomura marcomura closed this Feb 6, 2025
@marcomura marcomura reopened this Feb 6, 2025
@marcomura marcomura merged commit d988ed7 into main Feb 6, 2025
2 checks passed
@marcomura marcomura deleted the AXON-95-unable-to-attach-files-when-creating-a-jira-cloud branch February 6, 2025 20:29
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

Successfully merging this pull request may close these issues.

3 participants