Sa'id bin Jubayr (may Allah have mercy on him) said: I spoke to Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) about Surah al-Anfal, and he said: "It was revealed concerning Badr."
Imam al-Shafi'i (may Allah have mercy on him) said: As for what is taken as evidence from the incident of Sayyiduna Abdullah bin Jahsh (may Allah be pleased with him) and Ibn al-Hadrami, that incident was before Badr and before the revelation of these verses. Their incident took place at the end of the sacred month, so they held back (from deciding) about it until this verse was revealed: "They ask you about fighting in the sacred month. Say: Fighting in it is a grave matter." [Surah al-Baqarah: 217] And it has no bearing on the matter in which al-Awza'i (may Allah have mercy on him) was opposed. The Shaykh (may Allah have mercy on him) said: The story of Sayyiduna Abdullah bin Jahsh (may Allah be pleased with him) has already been mentioned in the narration of Sayyiduna Jundub bin Abdullah (may Allah be pleased with him).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 17988