Is there any way we can find out the jira issue id from the attachment id,
We having a public Jira projects for customers and if there is any attachments are added which having sensitive data in it which should not be visible to customer.
Our security team are identifying such attachments and providing the direct links as shown below :
It does not showing which issue this attachment is belongs to so that Jira admins can update the same.
@Abhijeet Kale You can try the below steps to get the issue-key from attachment id
SELECT * FROM fileattachment where id = '12471219'
You will get an issue-id from the query result like below
Then find the issue-key using issue-id, you will get the details as shown in screenshot below
Let me know in case of any issues.
If you go this route, use some joins to go ahead and get all the information from the database.
select a.id as attachmentId,concat(p.pkey,'-',issuenum) as issueNum, filename
from fileattachment a
left join jiraissue i on i.id = a.issueid
left join project p on p.id = i.project
where a.id in (30604,26718,30700)
There is no way to know what issue a file is attached to from just its id. The id is a simple unique number which has no relationship to the issue.
Your security team should be looking at attachments visibility by checking the issues, not the direct urls, otherwise they're just wasting your time and theirs.
For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events