Many historical heads of state, e.g., Charlemagne (ca. 800 CE), Henry V (ca. 1413-1422 CE), George Washington (as head of state during the Revolutionary War ca. 1776 CE), and Napoleon (late 18th and early 19th century), sometimes led their armies into battle and fought side by side with their soldiers in the field of battle.
It remains common for monarchs and Presidents to have had military service prior to becoming a head of state.
For example, U.S. Presidents Teddy Roosevelt and Kennedy were war heroes, and Prince William, who is second in line to British thrown, like most of his predecessors, served in combat missions in the military.
But, somewhere along the line, heads of state stopped joining soldiers in battles while serving as head of state, even though many are formally "commanders in chief" of the military.
When was the last time that a currently serving head of state personally participated on a battlefield alongside his soldiers in combat (and not a mere assassination attempt or as a visitor to a war zone not intending to participate in combat)?