Dishwasher Repair

My dishwasher detergent dispenser would not open during the cycle. Removed cover off door and found the spring, which I assume is the draw bar spring, was lying inside cup in 2 pcs. I have purchased a spring from a Whirlpool parts store, but it looks smaller than the one that was there. What size is the correct spring, is it called the draw bar spring and where does it go.