In determining sentencing, the court has to decide which one of three categories the offence falls into, based upon 'harm' and 'culpability'.
For the 'harm' factor to be regarded as 'high', the victim must have suffered a level of injury just below that which would take the offence up to 'ABH' OR the victim would need to particularly vulnerable due to personal circumstances OR the attack must have been sustained or repeated.
For 'culpability' to be high, there would have to be factors such as a homphobic attack, an attack where the offender was the leader of a gang, premeditation, the use of a weapon or an intent to cause greater injury than was actually caused.
The court can only consider a custodial sentence if BOTH 'harm' and 'capability' are high (which makes it a category 1 offence). Even then, the 'starting point' sentence (from which the court must work up or down, depending upon the exact circumstances of the case) is still only a Community Order. Only in VERY exceptional circumstances would a first-time offender, convicted of a Section 39 offence, be sent to prison. (The likelihood would be effectively nil if the offender pleaded guilty at the first possible opportunity).
Chris