It's sort of like general military where they all go through training and then have jobs outside of combat. His job was just sanitation. It seemed like during his jaunt on Jakku he broke of his training after seeing one of his own killed and then realizing what they were doing. Sort of a PTSD break from the brainwashing that the First Order had done. He says during the escape he can fire blasters. Poe tells him that the TIE Turrets are the same general idea and he does it from what looks like the first time, even in the Falcon he says he can fire the Terrets to keep up his "Resistance Charade" but even once seated is telling himself "I can do this, I can do this" and even mentioned that he is pretty good at it throughout. My guess he would continue his trainings while just working.
So I would imagine he was "boot camp" trained but never combat ready until Jakku and then failed at that in the eyes of the First Order.
Also remember The First Order came from the idea of "What if the Nazis that had moved to Argentina all of a sudden decided to keep working with each other" according to Abrams, so it's an offshoot of the Empire that was left, the training and processes would be much more ragged with TFO than the Empire because people are trying to emulate something from the past instead of doing something new so them taking soldiers for numbers with the expectation that they'd be fine isn't out of the ordinary line of thinking. They wanted to "reprogram" him too afterwards realizing something was up, he just bolted.