fix job number caculation for extended workflow
Merge pull request #5164 from ticoann/extended_fix

fix job number caculation for extended workflow