
899 So.2d 770 (2005)
Michael D. COX, M.D., J.D., Plaintiff-Appellant,
v.
A. Michael BOGGS, Defendant-Appellee.
No. 39,566-CA.
Court of Appeal of Louisiana, Second Circuit.
April 6, 2005.
*771 Michael D. Cox, M.D., J.D., for Appellant.
A. Mike Boggs, for Appellee.
Before WILLIAMS, CARAWAY and MOORE, JJ.
MOORE, J.
Michael Cox appeals a judgment dismissing his claim for breach of contract and quantum meruit against A. Michael Boggs on exceptions of lis pendens and no cause of action. For the reasons expressed, we affirm.

Factual Background
Cox and Boggs are both attorneys in Bossier City. They were never partners, but from 1992 through 2003 they "worked together amicably" in numerous cases, *772 sharing labor, costs and expertise. In June 2004, Cox filed this suit for "specific performance, damages for breach of contract and/or quantum meruit," alleging that Boggs owed him money as a result of their agreements in two cases.
The first case, Boggs v. Sasaki, was a medical malpractice action in which Boggs was a plaintiff seeking damages for allegedly negligent medical care rendered to his father, Luke Boggs. According to the petition, Boggs retained Cox to represent himself, his father and other family members on a contingency fee basis. The petition did not allege that Boggs acted as counsel in this case or agreed to divide any attorney fees. Cox claimed he worked on the case for over two years, logging over 89 hours; however, in late 2003 Boggs dismissed him as his attorney, advising that he would not honor their contingency fee agreement and would hire another attorney. Cox also alleged that Boggs made no offer to pay him for the time already spent on the case. Cox prayed for $18,156.50, on a theory of quantum meruit, for his work in this case.
The second case, Brawley v. Hamm, was one in which Cox and Boggs had worked together as lawyers; it was still pending in the First JDC. The petition disclosed no details of the case, but asserted that Boggs refused to pay Cox his percentage despite amicable demands. Cox prayed for 40% of the attorney fee in this case.[1]
Boggs responded with exceptions of lis pendens as to the Brawley claim and no cause of action as to the Boggs claim. Boggs showed that before filing the instant suit, Cox had filed a privilege for lien and professional fees in Brawley. Since the privilege was filed first, Boggs urged the instant suit, seeking recognition of the same claim, should not be allowed to proceed. The exception of no cause of action urged that Boggs was pending before a medical review panel, and the proper procedure to enforce his alleged contingency fee was an intervention in that proceeding. Boggs also alleged that Cox has no cause of action against him for a contingency fee, but only against his client. By memorandum, Boggs also argued that the contingency fee could be recovered only when the claim was collected. Boggs conceded that he and Cox had worked together and agreed to split the fees, on a contingency basis, in both Boggs and Brawley, and that he had terminated their business relationship on October 15, 2003, paying Cox $25,425.49 as his portion of the fee in Brawley.
Cox opposed the exceptions, reiterating that in Boggs, Boggs was a client, and arguing that in Brawley, Boggs discharged him when the case reached the stage of settlement with the last insurer. He also argued that the lien in Brawley only preserved his claim in the event of settlement, did not establish or determine his rights, and involved different parties than the instant suit. Finally, he urged that in Boggs, the action for quantum meruit is recognized when the parties no longer have a contingency fee contract.
At a hearing in August 2004, each party argued on his own behalf. Boggs agreed that although he had filed an exception of no cause of action as to the Boggs claim, his argument was really one of prematurity, as the plaintiffs had not yet recovered anything. The district court sustained both exceptions and rendered judgment dismissing Cox's petition. Cox appeals.


*773 Discussion: No Cause of Action

By his second assignment of error, Cox urges the district court erred in sustaining the exception of no cause of action. This exception is valid only if "the plaintiff can prove no set of facts in support of any claim which would entitle him to relief." Haskins v. Clary, 346 So.2d 193 (La.1977). He contends that an attorney obviously has the right to compensation for his work, and that after an attorney is discharged without good cause, the measure of his compensation is quantum meruit. In support he cites Krebs v. Bailey's Equipment Rentals Inc., 328 So.2d 775 (La.App. 1 Cir.1976); Wright v. Fontana, 290 So.2d 449 (La.App. 2 Cir.1974).
Boggs responds that only the client is responsible for the attorney's compensation. Milly v. ADF Services of La. Inc., 514 So.2d 630 (La.App. 3 Cir.1987). He contends that as the former attorney in Boggs, he cannot be liable for any portion of "an unknown and unearned fee." He suggests that Cox's claim should be brought in the pending litigation where all clients, not just Boggs, are parties.
The peremptory exception of no cause of action is used by the defendant to test the legal sufficiency of the petition by determining whether the law affords a remedy to the plaintiff on the facts alleged in the petition. Hoag v. State, XXXX-XXXX (La.12/1/04), 889 So.2d 1019; Fleet Fuel Inc. v. Mynex Inc., 38,696 (La.App. 2 Cir. 6/23/04), 877 So.2d 234. The exception of no cause of action is not the proper vehicle for a defendant to assert that somebody else is liable for the plaintiff's claim. Fleet Fuel Inc. v. Mynex, supra. However, the caption of the pleading does not control; the court is obligated to determine its substance. Smith v. Cajun Insulation Inc., 392 So.2d 398 (La.1980); Ford Motor Credit Co. v. Brown, 32,995 (La.App. 2 Cir. 4/5/00), 756 So.2d 654.
Accepting the allegations of Cox's petition as true, we agree that he has stated a cause of action. He acted as attorney for Boggs and his family on a contingency basis; after performing a significant amount of work, he was discharged without cause in favor of a successor attorney. The petition does not allege any joint venture between Cox and Boggs to represent the Boggs family. Cox is therefore entitled to recover the amount prescribed in the contingency agreement. Saucier v. Hayes Dairy Products Inc., 373 So.2d 102 (La.1979) (on rehearing); O'Rourke v. Cairns, 95-3054 (La.11/25/96), 683 So.2d 697.
Nevertheless, the district court properly recognized that the real thrust of this exception was prematurity. The attorney's right to a contingency fee is not acquired until the claim in the underlying case is reduced to judgment or settlement. American Bank & Tr. Co. v. Byron, 347 So.2d 850 (La.App. 2 Cir.), writ denied, 351 So.2d 155 (1977); Curry & Friend, A Professional Law Corp. v. Weiss, 97-2756 (La.App. 4 Cir. 4/22/98), 712 So.2d 975; Worldwide Remediation Inc. v. Onebane Bernard, 211 F.3d 948 (5 Cir.2000). At the instant hearing, the issue of prematurity was before the court despite the caption of the exception as no cause of action. The court did not err in finding that Cox cannot collect a contingency fee until Boggs is reduced to judgment or settlement. The effect of a finding of prematurity is that "the premature action, claim, demand, issue or theory shall be dismissed." La. C.C.P. art. 933. The portion of the judgment dismissing the Boggs claim on the basis of prematurity is affirmed.

Lis Pendens
By his first assignment of error, Cox urges the district court erred in sustaining *774 the exception of lis pendens. Citing older jurisprudence, he contends that lis pendens bars a second suit only if the parties and cause of action in both suits are identical. General Finance Co. of La. v. Veith, 184 So. 364 (La.App. 4 Cir.1938); State v. Kreider, 21 La. Ann. 482 (1869). He submits that the privilege is an in rem intervention in which Boggs is not a party while the instant suit is an in personam claim against Boggs.
Boggs responds that the proper method to assert Cox's claim is by the intervention in Brawley, the underlying suit.
Since a 1990 amendment, La. C.C.P. art. 531 has delineated lis pendens as follows:
When two or more suits are pending in a Louisiana court or courts on the same transaction or occurrence, between the same parties in the same capacities, the defendant may have all but the first suit dismissed by excepting thereto as provided in Article 925. When the defendant does not so except, the plaintiff may continue the prosecution of any of the suits, but the first final judgment rendered shall be conclusive of all.
The 1990 amendment eliminated the requirement of identical causes of action in both suits. Glass v. Alton Oschner Med. Foundation, XXXX-XXXX (La.App. 4 Cir. 11/6/02), 832 So.2d 403, writs denied, 2002-2977, 3018 (La.3/14/03), 839 So.2d 36, 37. Since the amendment, the test for granting an exception of lis pendens is whether a final judgment in the first suit would be res judicata in the second suit. Shreveport Electric Co. v. Oasis Pool Serv. Inc., 38,776 (La.App. 2 Cir. 9/29/04), 889 So.2d 274; Warner v. Carimi Law Firm, 98-613 (La.App. 5 Cir. 12/16/98), 725 So.2d 592, writ denied, 99-0466 (La.4/1/99), 742 So.2d 560.
Cox's lien, filed October 16, 2003, invoked the authority of La. R.S. 9:5001, which confers a privilege for legal fees on the amount of all judgments obtained by lawyers.[2] This privilege applies only to judgments, not settlements. Calk v. Highland Const. & Mfg., 376 So.2d 495 (La. 1979). Another statute, La. R.S. 37:218, specifically applies to settlements and protects attorneys from many of the adverse financial consequences of discharge under these circumstances.[3] Moreover, Louisiana courts have consistently recognized the right of the discharged attorney to *775 enforce his claim for fees through intervention in the suit in which the attorney provided service. Simmons v. Chambliss, 37,461 (La.App. 2 Cir. 8/20/03), 852 So.2d 1237, and authorities therein. Cox has alleged a contract that sets forth the percentage of fees due each attorney, so there is no need to engage in a quantum meruit analysis. Barham & Arceneaux v. Kozak, 2002-2325 (La.App. 1 Cir. 3/12/04), 874 So.2d 228, writ denied, XXXX-XXXX (La.6/4/04), 876 So.2d 87; Scurto v. Siegrist, 598 So.2d 507 (La.App. 1 Cir.), writ denied, 600 So.2d 683 (1992).
There is no merit in Cox's contention that lis pendens does not apply. Cox has sought, by the traditional means of filing a privilege, to enforce his right to a share of the attorney fees in Brawley. Subsequently, he filed the instant suit, arising out of the same transaction and seeking the same object. Moreover, in both actions Cox has alleged that Boggs was the person who breached the contract. This provides a sufficient identity of parties for an application of lis pendens. The portion of the judgment dismissing the Brawley claim on grounds of lis pendens is affirmed.

Conclusion
For the reasons expressed, the judgment is affirmed. Costs are charged to the appellant, Michael D. Cox, M.D., J.D.
AFFIRMED.
CARAWAY, J., concurs with written reasons.
CARAWAY, J., concurring.
I agree with the majority's first conclusion affirming the exception on the grounds of prematurity because of the contingency fee which, pending resolution of the Boggs litigation, has yet to materialize. Nevertheless, the Brawley litigation also involves a contingency fee in which Cox may eventually share, making his claim for that fee likewise premature. The majority correctly notes that the substance of the exception not its caption controls. Yet, after appropriately articulating the controlling rationale for both matters, the majority proceeds to stretch the rule regarding lis pendens beyond its intended application. La. C.C.P. art. 531 contemplates two suits "between the same parties in the same capacities." Defendant, Boggs, is not a party in the Brawley litigation. He is not defending two pending suits for which the exception of lis pendens is intended to relieve. I therefore respectfully concur and would find that both of plaintiff's claims for unrealized contingency fees remain premature.
NOTES
[1]  Cox also cited a third case in which the two men had worked together, but a dispute arose when Boggs told Cox a settlement check had bounced, and Cox would have to return his portion of the fee. This dispute was not part of the demand in the instant suit.
[2]  This statute provides in pertinent part: "A special privilege is hereby granted to attorneys at law for the amount of their professional fees on all judgments obtained by them, and on the property recovered thereby, either as plaintiff or defendant, to take rank as a first privilege thereon superior to all other privileges and security interests under Chapter 9 of the Louisiana Commercial Code."
[3]  This statute provides in pertinent part: "By written contract signed by his client, an attorney at law may acquire as his fee an interest in the subject matter of a suit, proposed suit, or claim in the assertion, prosecution, or defense of which he is employed, whether the claim or suit be for money or for property. Such interest shall be a special privilege to take rank as a first privilege thereon, superior to all other privileges and security interests under Chapter 9 of the Louisiana Commercial laws. In such contract, it may be stipulated that neither the attorney nor the client may, without the written consent of the other, settle, compromise, release, discontinue, or otherwise dispose of the suit or claim. Either party to the contract may, at any time, file and record it with the clerk of court in the parish in which the suit is pending or is to be brought or with the clerk of court in the parish of the client's domicile. After such filing, any settlement, compromise, discontinuance, or other disposition made of the suit or claim by either the attorney or the client, without the written consent of the other, is null and void and the suit or claim shall be proceeded with as if no such settlement, compromise, discontinuance, or other disposition has been made."
