The goodybag is on your account, not the SIM, and it will still be available after you've transferred your number to giffgaff (although it will be removed temporarily to allow the transfer to take place.)
I have just got a new sim and have a full goodybag. If i now, request to change the number of this sim to my old number, will that goodybag remain in the sim once the number is transferred?
Yes. It may appear to disappear while the transfer is taking place, but once the dust has settled, your balance and goodybag will be as they were on your account. Effectively, all that changes is your number.
When you say you want to keep your old number,do you mean your old number from a different network provider and using a PAC?
If so,the only thing you will "lose" is the (giffgaff) number allocated to you upon activation of your giffgaff sim.
Your goodybag and/or airtime credit will remain on your account/sim.
Having said that,on the day of transfer,you'll notice that your (giffgaff) number,goodybag and/or airtime credit will disappear from your dashboard.Don't worry-this is normal.Once the transfer has fully completed,your (previous provider's) number,goodybag and/or airtime credit will appear on your dashboard.