# Details of files committed against a jira ticket

**URL:** https://forum.library.adaptavist.com/t/details-of-files-committed-against-a-jira-ticket/174
**Category:** ScriptRunner
**Tags:** jira, data-center
**Created:** [June 27, 2022, 2:10pm UTC](https://forum.library.adaptavist.com/t/details-of-files-committed-against-a-jira-ticket/174 "2022-06-27T14:10:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![krishnanayak](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.library.adaptavist.com/krishnanayak/32/65_2.png) [@krishnanayak](https://forum.library.adaptavist.com/u/krishnanayak)
#### Post date: [June 27, 2022, 2:10pm UTC](https://forum.library.adaptavist.com/t/details-of-files-committed-against-a-jira-ticket/174/1 "2022-06-27T14:10:31Z")

</div>

is it possible to get details the files committed against a jira ticket from the dev status panel? We want to updated a field if a certain type of file is commited. this is using purely scriptrunner for jira.

---

<div class="post-metadata">

### Author: ![imadero](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.library.adaptavist.com/imadero/32/59_2.png) [@imadero](https://forum.library.adaptavist.com/u/imadero)
#### Post date: [June 28, 2022, 5:26am UTC](https://forum.library.adaptavist.com/t/details-of-files-committed-against-a-jira-ticket/174/2 "2022-06-28T05:26:32Z")

</div>

Hi @krishnanayak i’m not sure about what are you asking exactly, but looks like you need a a listener that get the attachments added.  
Yo can do it on the following way:

```auto
final Long ISSUE_UPDATED_EVENT_TYPE_ID = 2L
if (issueEvent.eventTypeId == ISSUE_UPDATED_EVENT_TYPE_ID) {
    List<String> attachmentNames = []
    issueEvent.changeLog.getRelated('ChildChangeItem').each { change ->
        if (change.field == 'Attachment') {
            if (!change.oldstring) attachmentNames.add(change.newstring as String)
        }
    }

```

and from the names you can get the extension of the files or whatever you need.  
Let me know if this is what you are looking for.  
Thanks, Ivan.

---

<div class="post-metadata">

### Author: ![krishnanayak](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.library.adaptavist.com/krishnanayak/32/65_2.png) [@krishnanayak](https://forum.library.adaptavist.com/u/krishnanayak)
#### Post date: [June 28, 2022, 6:09pm UTC](https://forum.library.adaptavist.com/t/details-of-files-committed-against-a-jira-ticket/174/3 "2022-06-28T18:09:08Z")

</div>

i am actually trying to get the files names from the Dev Status panel. the idea is update a flag in Jira if certain files are commited or are part of a PR:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/adaptavistlibrary/original/1X/9231770571adf28f0569be8c28cffefadf030517.png)

---

<div class="post-metadata">

### Author: ![imadero](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.library.adaptavist.com/imadero/32/59_2.png) [@imadero](https://forum.library.adaptavist.com/u/imadero)
#### Post date: [June 30, 2022, 9:55am UTC](https://forum.library.adaptavist.com/t/details-of-files-committed-against-a-jira-ticket/174/4 "2022-06-30T09:55:48Z")

</div>

I never work with that, so i can’t give you any concrete answer. Sorry. But Adaptavist has a paid service that develops scripts for clients, so maybe they can help you. This is the link, [Jira Service Management](https://scripting.atlassian.net/servicedesk/customer/portal/3)
