Laura Gower hit the man on the face and arms, after she flew into a rage when she learned an old female school friend was at his Huthwaite address, on December 22.
“As soon as she heard the woman’s name she demanded that her son was brought back,” said prosecutor Ben Payne.
“She became aggressive. She swung her fists, hitting him on the arms and face.”
When her ex took the child indoors, Gower said she would leave if she was given the boy, but tried to punch her ex again when he came outside.
And when her school friend asked what the problem was, Gower shouted abuse, then shoved the woman in the chest and grabbed her face.
Probation officer Sarah Todd, said Gower, who had no previous convictions, demonstrated some remorse towards her partner but less to the female.
“She used violence to gain compliance,” said Ms Todd.
Gower, 33, of Frederick Street, admitted two counts of assault when she appeared at Mansfield Magistrates Court, on January 9.
On Wednesday, district judge Jonathan Taaffe said: “To effectively go around, shouting the odds and engaging in violence in front of a young child, is unforgivable.
“It must never be repeated.”
He handed Gower a 12 month community order, with 20 rehabilitation activity requirements. He fined her £50, with £85 costs and an £85 government surcharge. No compensation was ordered.