hi!
labour court nothing to do any thing in NOC or transfer of visa. labour court only deals with your settlement issues with company.

moreover you still not completed your first contract with your co. ie 2 years as you mentioned.

NOC can be obtained at any time but it completely depends on your co.

Transfer can be done after completion of atleast 01 year if, you are on transferable visa. and you can ask for the first time after completion of your first contract period mentioned in your contract agreement it may be 01,02,03 & 05 years.depending upon co. in qatar.

in your case you can do only humble request to co. that they can release you on humanitarian ground which few co. doing here in qatar.

best luck!