Well, as I said it was just a bit of a hack by adding a custom field to item group. So no real programing and therefor no pull request. But I agree that should be part of the core. Maybe somebody of the developers like @rmehta could add that if it’s not to much work?
Actually I think this can be very powerful in the future.
If the grouping is done smart well enough, it would allow us also to run item-group wise analyses or even forecasting. So you could get e.g. Stock reports for specific groups of items.
Even more importantly, I think there is strong potential in using the hierarchical information for stock forecasting. I am not sure if you are familiar with hierarchical forecasting (see e.g. https://otexts.com/fpp3/hts.html). Hierarchical forecasting generally boosts the forecasts performance because you take additional information from higher hierarchical levels (in Frappe jargon: parent levels). Probably not something that can be done right away (although also not too complicated to implement) but going this route would open up entirely new potentials.
(Edit: another maybe more basic and less mathematic intro to the concept of hierarchical forecasting: https://medium.com/opex-analytics/hierarchical-time-series-101-734a3da15426)