Christopher Blair grabbed a kitchen knife and chased after the man he found him in ex partner's house in Pontefract.
The 38-year-old had visited the address to speak with his long-standing partner on the morning of July 18 last year, prosecutor Samuel Ponniah told Leeds Crown Court.
Blair let himself into the property on Poppy Fields Way where the woman lived with their two young girls and began arguing with the woman.
He then grabbed her by the arms, swung her around and began punching her to the head.
When a man then came down the stairs, Blair asked him who he was, before he went into the kitchen, grabbed a knife and chased him back upstairs.
The man ran into the children's bedroom, closed the door and held it shut to prevent Blair entering. The children were downstairs at the time.
Blair then began stabbing at the door to get to him, catching the man's finger with the blade and cutting him.
His ex partner came running up the stairs and tried to grab him, and the knife caught her thigh in the struggle, cutting her also.
Blair eventually relented and left the house, driving off in the woman's Nissan Qashqai.
He was later arrested and told the police he had thrown the keys to the vehicle in the sea, but denied the attacks, claiming the woman and the man were the aggressors.
Blair, of no fixed address, eventually admitted two charges of assaulting occasioning actual bodily harm (ABH) and theft of the vehicle.
A probation report into his offending read: "It was a perfect storm with feeling of jealousy, hurt and disappointment.
"He lost control and understands that. He is ashamed his children heard, of they did not see what happened."
The court heard that Blair has previous convictions, but none for violence.
Mitigating, David Hewitt said: "This was the product of a very difficult end to a relationship.
"It is the first incident of violence within a 17-year relationship. He is a hard-working man who has done something out of character for him."
Judge Geoffrey Marson QC told Blair: "Inevitably, there has to be custodial sentence.
"I'm prepared to accept it was entirely out of character."
He handed him a 12-month jail sentence and a five-year restraining order to stay away from his ex partner.
Having spent six months held on remand, it was likely that Blair would be freed almost immediately, having served the the equivalent to half of his sentence.
The remainder will be served on licence.