A 37-year-old man has been jailed over a violent rampage at Hungry Jacks in Baldivis.
The man abused staff and threw drinks and other items at them on Wednesday morning before assaulting a teenage boy inside the store.
He then attacked an elderly traffic warden outside the fast-food restaurant.
The 81-year-old man was pushed to the ground and kicked.
He was taken to Rockingham Hospital for treatment and is now recovering at home.
Members of the public stepped in to detain the accused before he was arrested by police.
Speaking on 7NEWS, witness Chelsea Lilley said the man became angry over a drink.
"It was all over a vanilla mocha that wasn't 'vanillary' enough," she said.
The Gosnells man was charged with assaulting a public officer, unlawful wounding, making a threat to unlawfully do an act, common assault, criminal damage and failing to give police personal details.
He appeared before the Rockingham Magistrates Court on Thursday where he pleaded guilty to the offences.
The man was sentenced to one year and nine months behind bars.

City of Mandurah wins gold at WA Tourism Awards
Vandals attempt to cut down iconic 500-year-old King Jarrah Tree
Christmas on the Murray 2026
Mandurah MLA Rhys Williams takes the plunge for prostate cancer
Rockingham intersection set for $8 million upgrade
Detectives investigate report of alleged historic child sex assault near Medina supermarket
Bertram couple charged with alleged physical abuse of children
Young man charged over alleged dangerous police chase through Mandurah
Kwinana's new pre-booked verge collection sees massive drop in bulk waste disposal
