Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-29540

Jenkins job does not fail when it is not able to make state transition on JIRA issue

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • Jenkins Version - 1.613
      Jira Issue Updater - 1.12
      JIRA Version - 5.2.1

      Jenkins job does not fail when it is failed to make issue transition per specified workflow action.

          [JENKINS-29540] Jenkins job does not fail when it is not able to make state transition on JIRA issue

          Hi,

          I choose a defensive approach for error handling at the time of implementation: only logged the problem (so that it can be fixed by changing Jira settings if needed), but did not make the job fail. My idea was to let the job do as much as it can. If for example no matching issues are found I considered that the job should not fail (for periodically running jobs it's likely to not find new issues at each run). I considered the same about an impossible transition. Maybe some issues are transitioned correctly others are not (depending on their corresponding workflow scheme).
          Not sure if failing to update a single issue should fail the job or not.

          I did not plan to fail the job for incorrect Jira config, only for incorrect Jenkins config. I agree that whether failing a job silently is a good idea or not is indeed debatable

          Did I convince you? If you have some solid arguments we could change the behavior the way you suggested.

          Regards,
          Laszlo

          Laszlo Miklosik added a comment - Hi, I choose a defensive approach for error handling at the time of implementation: only logged the problem (so that it can be fixed by changing Jira settings if needed), but did not make the job fail. My idea was to let the job do as much as it can. If for example no matching issues are found I considered that the job should not fail (for periodically running jobs it's likely to not find new issues at each run). I considered the same about an impossible transition. Maybe some issues are transitioned correctly others are not (depending on their corresponding workflow scheme). Not sure if failing to update a single issue should fail the job or not. I did not plan to fail the job for incorrect Jira config, only for incorrect Jenkins config. I agree that whether failing a job silently is a good idea or not is indeed debatable Did I convince you? If you have some solid arguments we could change the behavior the way you suggested. Regards, Laszlo

          Jayesh Gohil added a comment -

          Hi,

          The plugin has two checkboxes with an option to fail the build if JQL returns error and if no issues are matched. It will be awesome if it can have an option to fail the build if it is not able to update or make transition on issue. This will allow user to control the behavior if he wants to explicitly fail the build if update fails.

          Thanks,

          Jayesh

          Jayesh Gohil added a comment - Hi, The plugin has two checkboxes with an option to fail the build if JQL returns error and if no issues are matched. It will be awesome if it can have an option to fail the build if it is not able to update or make transition on issue. This will allow user to control the behavior if he wants to explicitly fail the build if update fails. Thanks, Jayesh

            jaygohil Jayesh Gohil
            jaygohil Jayesh Gohil
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: