We have been using the notify for only last retry failure: Alerts option recently. Here is my tests that i have done.
JobA is setup with retry 1, interval 0 and return code 10. The job when ran fails with a RC of 10 and it works fine, the job auto resubmits and the alert only gets fired upon the 2nd failure (1st auto resubmit).
JobB is setup exactly the same, the only difference is that when it runs it fails with a RC of 2. When it runs it does not auto resubmit which is expected. However, the alert does not get fired off. If i change this job to run and fail with a RC of 10 then it does fire the alert.
There is no explicit return code defined to the alert within the Job - Notifications - Alert tab. Can someone please verify that this is working as designed. I don't believe it should be, the return code that you specify to auto resubmit the job seems to be overriding when the alert gets ran.
We are on 12.1 build 1895