Humour in the workplace can already be a hit-or-miss affair, as there's no guarantee your colleagues' sense of humour will tickle your funny bone (or vice versa, for that matter).

But it's even more of an issue with your boss, as the nature of that bond means that any 'off' jokes or inappropriate attempts at levity can seriously disrupt your working relationship. Now researchers have looked at this very thing, surveying 70 leaders and 241 of their subordinates across 54 workplaces to examine the impact of leader humour on subordinate job satisfaction – and what they found isn't what they expected.

"Generally, people think that positive humour, which is inclusive, affiliative and tasteful, is good in leadership, and negative humour, which is aggressive and offensive, is bad," said Christopher Robert, an associate professor in management at the University of Missouri in the US.

But while that certainly sounds like the logical (and safe) way to make jokes around your employees – avoiding negative humour, which could get people offside or even lead to complaints – the researchers found that sticking to vanilla humour isn't necessarily the best strategy for workplace gags.

"In our study, we found the effects of humour depend on the relationship between leaders and subordinates," said Robert. "Specifically, both positive and negative humour use by leaders is positively related to their subordinates' job satisfaction when the relationship between the leader and subordinates is good."

In other words, if you've already got a good thing going with your employees, even negative humour – which can otherwise be divisive – is good for the relationship and your subordinates' job satisfaction.

Unfortunately, the reverse is also true for bosses that have a poor relationship with their staff. It doesn't matter how funny you are (or think you are), if the bond with your staff is less than healthy, attempts to lighten the mood will probably backfire.

"[W]hen the leader-subordinate relationship is bad, both negative and positive types of humour are associated with lower job satisfaction," said Robert. "[I]n other words, for leaders, sometimes good humour has bad effects and bad humour has good effects on subordinates."

The results aren't exactly a carte blanche for popular bosses to say whatever droll thing pops into their head – the researchers specifically caution against racial or sexual stereotypes – but they do suggest that bosses who enjoy a good relationship with workers also enjoy a lot more leeway when making the funnies.

But what if you don't have a good bond with your staff? Humour can still help, but that comes later. Not in the job interview, then.

"Instead of using humour to build relationships, leaders should work to build strong relationships through other means such as through clear communication, fair treatment, and providing clear and useful feedback," said Robert. "Humour then can be used to maintain those strong relationships."

The findings are published in Group & Organisation Management.