[TOM-166] automatically assign a number to ref field

Merged Joel Maglioni requested to merge TOM-166 into 15.0-stage

Closes TOM-166

Merge request reports