Uploaded image for project: 'Automation for Jira Server'
  1. Automation for Jira Server
  2. JIRAAUTOSERVER-1032

Automation Rule remaining 'In Progress' When Node goes down

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Low Low
    • None
    • 9.0.3, 9.1.1
    • None
    • Severity 3 - Minor

      Issue Summary

      Automation Rule remaining 'In Progress' status in Audit Log when the node running the rule node goes down

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Create an Automation rule with 'Execute a ScriptRunner Script' action
        • Script runs for 3 minutes
        • Example of script used is as follows:
          import org.slf4j.LoggerFactory
          import com.atlassian.jira.component.ComponentAccessor
          
          // Define a logger
          def log = LoggerFactory.getLogger("com.onresolve.scriptrunner.runner.ScriptRunnerImpl")
          
          def longRunningTask = {
              // Total running time in milliseconds (3 minutes * 60 seconds * 1000 milliseconds)
              long totalRunTime = 3 * 60 * 1000
              long startTime = System.currentTimeMillis() // Capture start time
              
              while (System.currentTimeMillis() < startTime + totalRunTime) {
                  // Logging a message instead of printing
                  log.warn("This script is still running...")
                  
                  Thread.sleep(300)
              }
              
              log.warn("The script has completed its 3-minute run.")
          }
          
          // Execute the long-running task
          longRunningTask()
          
      2. Stop node that initiated the rule.

      Expected Results

      Automation Rule should not be left 'In Progress' status

      Actual Results

      The script will stop running but the automation Rule remaining 'In Progress'

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Unassigned Unassigned
              9f03f4114502 Pablo Bartolome (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: