Yazid bin Suhayb al-Faqir said: I asked Sayyiduna Jabir (may Allah be pleased with him): Is there shortening in the two rak'ahs of travel? Sayyiduna Jabir (may Allah be pleased with him) said: There is no shortening in the two rak'ahs of travel; rather, the shortening is one rak'ah in battle. Then he related that he was with the Prophet (peace and blessings be upon him) at a time of fighting, and the time of prayer came. The Prophet (peace and blessings be upon him) stood, and one group formed a row behind him (peace and blessings be upon him) while the other group remained facing the enemy. He (peace and blessings be upon him) led them in one rak'ah and made two prostrations in it. Then those who had prayed behind him (peace and blessings be upon him) went to the other group's place. Then the other group came and prayed behind the Prophet (peace and blessings be upon him), and he (peace and blessings be upon him) led them in one rak'ah and made two prostrations in it. Then the Prophet (peace and blessings be upon him) sat and gave the salam. Then those who were behind him (peace and blessings be upon him) gave the salam, and the others too. The Messenger of Allah (peace and blessings be upon him) had two rak'ahs and the people one rak'ah each.
Then Yazid recited this verse: "And when you are among them and establish the prayer for them" [Surah al-Nisa: 102].
The Shaykh said: It is possible that what Sayyiduna Jabir (may Allah be pleased with him) described was the prayer of the Prophet (peace and blessings be upon him) in a campaign, and likewise others described that they prayed one rak'ah on their own. In any case, the affirming report is the one to be taken.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب صلاة الخوف / 6052