Get cost for work to pay for JFK->SFO->DUB as you will already be in JFK territory. If they ok that then work whatever angle you can that uses existing JFK->DUB piece to reduce cost (like a refund?)
Then when you end up saving the company money you gain brownie points on top of the points for work messing up your vacation.