Reference number in Gantt view

I’m trying to modify the code in order to have visible the reference number in gantt view. In the Board I could do it. But I’m stuck when trying to do this in Gantt. My programing skills are limited, can anyone provide some hints in order to achieve this?