Problem summary

      Changes in Epic link field does not trigger listener for "Issue Updated" event. As an example, Webhook will not fire when it is configured for "Issue Updated" and the only change for the issue is on the Epic link.

      Steps to Reproduce:

      1. Create a listener for "Issue Updated"
      2. Update just Epic Link field,

      Actual Result:

      Listener is not triggered.

      Expected Result:

      Listener is triggered.

      Notes

      This is the only field that has the problem. All other fields (standard, custom, Agile, etc.) do not exhibit this problem.

      See https://answers.atlassian.com/questions/22645060/sil-listener-script-not-being-called-on-issue-update

            [JSWSERVER-12299] Change in Epic Link field does not trigger listener

            For anyone coming here looking for a way to do updates to Epics when an Epic Link is changed on a ticket, you can start with this guidance: https://codebarrel.atlassian.net/browse/AUT-1264?focusedCommentId=107261

            Basically, you have to use Issue Updated (or Multiple Issue Events) as the trigger, and then look at the special changelog smart value to see if it was an Epic Link change.

            Some how-to: https://community.atlassian.com/t5/Jira-Software-questions/Jira-Automation-How-to-identify-what-Epic-a-Story-was-linked-to/qaq-p/1924599

            Matt C. Wilson added a comment - For anyone coming here looking for a way to do updates to Epics when an Epic Link is changed on a ticket, you can start with this guidance: https://codebarrel.atlassian.net/browse/AUT-1264?focusedCommentId=107261 Basically, you have to use Issue Updated (or Multiple Issue Events) as the trigger, and then look at the special changelog smart value to see if it was an Epic Link change. Some how-to: https://community.atlassian.com/t5/Jira-Software-questions/Jira-Automation-How-to-identify-what-Epic-a-Story-was-linked-to/qaq-p/1924599

            When will it be fixed?

            Andrei Kuntsevich added a comment - When will it be fixed?

            Tim Malone added a comment - - edited

            Thanks for the workaround idea @Konrad Garus.

            @tom.shoval here's a quick Groovy script I've put together that can be built on to use as a custom script listener. Use the IssueLinkCreatedEvent. Note that the link type ID may need tweaking if your 'Epic-Story Link' link type isn't at ID 10500.

            import com.atlassian.jira.component.ComponentAccessor
            import com.atlassian.jira.issue.IssueManager
            
            // Get data for this issue link
            //
            // 4 properties are available here:
            // - issueLink.id = the unique ID of this link
            // - issueLink.issueLinkType.id = ID of the link type
            // - issueLink.destinationId = ID of issue being added to epic
            // - issueLink.sourceId = ID of epic being added to
            def issueLink = event.getIssueLink()
            
            // Quit now if this isn't an 'Epic-Story Link' link type (ID 10500)
            if ( issueLink.issueLinkType.id != 10500 ) {
              log.error("Not an epic link")
              return
            }
            
            // Get full issue data
            def manager = ComponentAccessor.getComponent(IssueManager)
            def issue = manager.getIssueObject(issueLink.destinationId)
            def epic = manager.getIssueObject(issueLink.sourceId)
            
            // You can then use eg. issue.key, issue.summary, epic.key, etc.
            

            From here you could then do something like send alerts to Slack as described here: https://library.adaptavist.com/entity/send-custom-notification-to-slack

            Tim Malone added a comment - - edited Thanks for the workaround idea @Konrad Garus. @tom.shoval here's a quick Groovy script I've put together that can be built on to use as a custom script listener. Use the IssueLinkCreatedEvent . Note that the link type ID may need tweaking if your 'Epic-Story Link' link type isn't at ID 10500. import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.IssueManager // Get data for this issue link // // 4 properties are available here: // - issueLink.id = the unique ID of this link // - issueLink.issueLinkType.id = ID of the link type // - issueLink.destinationId = ID of issue being added to epic // - issueLink.sourceId = ID of epic being added to def issueLink = event.getIssueLink() // Quit now if this isn 't an ' Epic-Story Link' link type (ID 10500) if ( issueLink.issueLinkType.id != 10500 ) { log.error( "Not an epic link" ) return } // Get full issue data def manager = ComponentAccessor.getComponent(IssueManager) def issue = manager.getIssueObject(issueLink.destinationId) def epic = manager.getIssueObject(issueLink.sourceId) // You can then use eg. issue.key, issue.summary, epic.key, etc. From here you could then do something like send alerts to Slack as described here: https://library.adaptavist.com/entity/send-custom-notification-to-slack

            tom.shoval added a comment -

            Hi,

            Can anyone share an implementation example / print screen of the workaround using the webhooks? not sure i understand how i can achieve it using this...

            "As kind of a workaround, it does fire IssueLinkCreatedEvent and IssueLinkDeletedEvent with hidden link type named "Epic-Story Link"."

             

            Thanks!!

            Tom

            tom.shoval added a comment - Hi, Can anyone share an implementation example / print screen of the workaround using the webhooks? not sure i understand how i can achieve it using this... "As kind of a workaround, it does fire IssueLinkCreatedEvent and IssueLinkDeletedEvent with hidden link type named "Epic-Story Link"."   Thanks!! Tom

            Would be great to see a fix! We use Jira project automation and have some teams that put programs in a single Jira project and manage them with team epics. We need to fire off automation rules when something is switched from team to team. (such as move all the sub-tasks as well)

            Rob Laddish added a comment - Would be great to see a fix! We use Jira project automation and have some teams that put programs in a single Jira project and manage them with team epics. We need to fire off automation rules when something is switched from team to team. (such as move all the sub-tasks as well)

            As kind of a workaround, it does fire IssueLinkCreatedEvent and IssueLinkDeletedEvent with hidden link type named "Epic-Story Link".

            Konrad Garus added a comment - As kind of a workaround, it does fire IssueLinkCreatedEvent and IssueLinkDeletedEvent with hidden link type named "Epic-Story Link".

            Fix please

            Thibault Clavier added a comment - Fix please

            Any news on this problem please?

            Dam - iDalko added a comment - Any news on this problem please?

             Any fix to this problem?

            Sugandha Singh added a comment -  Any fix to this problem?

            This bug is also affecting some of our clients. We are looking forward to this bugfix. 

            Dusan

            Dusan Spaic added a comment - This bug is also affecting some of our clients. We are looking forward to this bugfix.  Dusan

              drauf Daniel Rauf
              c31317ed3989 Chris Kast
              Affected customers:
              102 This affects my team
              Watchers:
              86 Start watching this issue

                Created:
                Updated:
                Resolved: