You did not provide any dates. If you have paid your bankruptcy attorney all the fees AND all the documents, information he/she needs, your petition should be ready to be signed and filed within a week. If the judgment comes through before you file, make sure it is listed on your petition and it will be wiped out, too. Good luck.
Please be aware that each answer is based upon the facts, or lack thereof, provided in the question. To be sure you get complete and comprehensive answers, based upon the totality of your situation, contact a local attorney who specializes in the area of law that involves your legal problem. Diane L. Gruber has been practicing law in Oregon for 26 years, specializing in family law, bankruptcy, estate planning and probate. Note: Diane L. Gruber does not represent you until a written fee agreement has been signed by you and Diane L. Gruber, and the fee listed in the agreement has been paid.
The debt to the JD buyer will be discharged in your BK, whether they receive a judgment or not.
Don't delay, though, because if you wait too long after they get their judgment, they might have time to try to garnish your wages or levy your bank account.
Once your bankruptcy is filed, you will get a case number showing it has been filed. That case number and filing date should be provided to the creditor's attorney on the lawsuit immediately upon receiving it, and it can't hurt to file proof of bankruptcy filing with the court either. Once your bankruptcy is filed, an injunction called the automatic stay goes into effect, which requires the state court lawsuit to stop. If, even by accident, a state court judgment were to be entered against you after the bankruptcy is filed, that judgment would be void, and of no effect. However, it is best to file the bankruptcy, if possible, before judgment is entered against you, since otherwise it may be necessary to file a judicial lien avoidance motion in the bankruptcy court to deal with it. Filing before judgment also prevents the judgment from showing up on your credit report.
Make sure you file a notice of stay in the state court proceeding after the bankruptcy is filed. Your attorney should do that for you, however some charge a small fee for doing it. You could always do it yourself. Make sure it gets done so that you do not face a judgment.