just the ticket - Phrases/Idioms
The American Heritage® Dictionary of Idioms by Christine Ammer. Copyright © 2003, 1997 by The Christine Ammer 1992 Trust. Published by Houghton Mifflin Harcourt Publishing Company. All rights reserved.
Also, that's the ticket. Exactly what is needed; exactly right. For example, This van is just the ticket for carrying all our luggage, or That's the ticket—you're handling that chain saw very well. The second phrase dates from the early 1800s, and the first is slightly newer. The exact allusion is disputed—it could be to a winning lottery ticket, a price tag for merchandise, or, as one writer suggests, a corruption of the French word etiquette for “appropriate behavior.” For a synonym, see way to go.