Is there a possibility to assign a number of milesstones to their respective components?
The idea is a following:
We've got components [A,B,C].
Component A has milestones [1,2,3]
Component B has milestones [4,5,6]
Component C has milestones [7,8,9]
On a "New ticket" page you can choose any milestone for any component. The task is to have an opportunity to strictly assign milestones to components and view statistic based on this structure.
Any ideas?
To answer your question the task needs to be clarified and detailed a bit more.
Being able to assign only appropriate milestones, you'll have to enforce input order:
So you'll need to conditionally hide the milestone input field, until a component has been selected. After selecting the component you'll need to fetch an updated milestone list. All that has to be done repeatedly, if you change the component before submitting the new ticket. And to not leave the /newticket page you'll even need to do page updates by back-ground requests (ajax style) that requires JavaScript.
You did not tell anything special about statistics, so I assume it could be done by a custom report the common way.
I know of a Trac plugin that is getting close: TracTicketChainedFieldsPlugin, but might still need some work to be done.