You've been a lucky boy getting a new battery under warranty.
If you have a look at your handbook it will state that you need to charge the battery if it is to be left for more than four weeks - either on the bike (using a suitable charger) or off the bike.