Batch history is not getting created for batch

Batch history is not getting created for batch.

On CSV upload, new batches are getting created. But the batch history is not created for the particular batch.

There is a “Batch History” doctype. But the data is not storing in the doctype.

How to store the batch history, when a new batch is created using CSV upload ?

Thanks