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

          Form Name

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

            Marko Radivojevic made changes -
            Remote Link Original: This issue links to "MNSTR-3204 (Bulldog)" [ 448238 ] New: This issue links to "MNSTR-3204 (JIRA Server (Bulldog))" [ 448238 ]

            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?
            Vinicius Mommensohn made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 559693 ]

            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
            set-jac-bot made changes -

            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
            SET Analytics Bot made changes -
            UIS Original: 80 New: 78
            Przemyslaw Czuj (Inactive) made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            SET Analytics Bot made changes -
            UIS Original: 82 New: 80

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

                Created:
                Updated:
                Resolved: