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 :
https://i<jira-base-url>/secure/attachment/1234321/server.log?
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
https://<basr-url>/rest/api/2/issue/12929342/
Let me know in case of any issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have direct database access or a scripting app such as ScriptRunner you could tackle it from that angle.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.
Register today!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.