We pranked the boss a couple of years running, he took it all in stride, the year we didn't prank him, he was upset, thought we were mad at him. We then pranked our budget planner, she laughed all day long.
To give you an idea of the pranks, one time we put DO NOT CROSS police barrier tape on his office door and drew a body in tape on the floor, I went and got some of those plastic bullet holes and put them on the windows, and threw a couple of spent shell casings on the floor.
The next year, we were in a huge budget crisis, we put a for rent sign next to his door, he liked it. Funny thing, the dean had a meeting with him and beat him to his office before he actually saw it. The dean thought it was a novel approach to closing the budget gap.
Of course sometimes the jokes will backfire, or at least have unintended outcomes. I worked in aerospace for a bunch of years, we had old engineers, really OCD guys, they even had pocket protectors and 6 inch slide rules in their pocket. One guy used to come in in the morning and take three brand new pencils out of the cabinet and sharpen them to within about 1/10th of an inch of each other, he then put them on his desk perfectly parallel to each other then go and get his cup of coffee. We would walk by and move one of the pencils ever so slightly or rotate them a couple of degrees. He would sit there and shake for about 5 minutes afterwards. He asked one time about it when all the pencils were out of whack, we told him an earthquake. After a year of this he left the group, not mad but left the group. Not our intention, but funny.
I have more of those, aerospace company engineers are some of the best people to work and have fun with.