
45 P.3d 895 (2002)
132 N.M. 175
2002-NMCA-053
Mabrouk CHAARA, Plaintiff-Appellee,
v.
Marcia L. LANDER, Defendant-Appellant.
No. 21,621.
Court of Appeals of New Mexico.
March 12, 2002.
Certiorari Denied May 9, 2002.
Mabrouk Chaara, Albuquerque, NM, Pro Se.
Marcia L. Lander, Albuquerque, NM, Pro Se.
Certiorari Denied, No. 27,485, May 9, 2002.

OPINION
WECHSLER, Judge.
{1} Unfortunately, domestic relations cases are often extremely contentious matters that breed continued litigation. The doctrine of res judicata bars continued litigation in certain circumstances. We examine in this appeal the application of res judicata *896 when one party to a divorce brings a subsequent tort action against the other party's attorney for action originating in the domestic relations case.
{2} Plaintiff Mabrouk Chaara (Husband) and his ex-wife, Patricia Michaud (Wife), formerly known as Patricia Chaara, bitterly contested child custody, visitation, and support issues in a domestic relations action. (Chaara v. Chaara) In this separate action (Chaara v. Lander), Husband sued Wife's former attorney, Defendant Marcia L. Lander (Wife's Attorney), for damages allegedly suffered as a result of Husband having to reschedule airline travel when Wife's Attorney failed to timely deliver the children's passports to the guardian ad litem pursuant to a court order in Chaara v. Chaara. Following a jury trial, the court entered judgment against Wife's Attorney. We reverse, holding that the parties' mutual involvement in Chaara v. Chaara bars Husband's lawsuit against Wife's Attorney in Chaara v. Lander.

Facts
{3} In Chaara v. Chaara, No. 20,689, slip op. at 1 (N.M.Ct.App. Oct. 30, 2000), Husband appealed child support orders issued June 17 and July 16, 1999. We affirmed. The record of that case is still available to us, and we take judicial notice of it. See State v. Turner, 81 N.M. 571, 576, 469 P.2d 720, 725 (Ct.App.1970) ("We take judicial notice of the records on file in this court.").
{4} The present appeal must be seen against the backdrop of the domestic relations action. In Chaara v. Chaara, the district court repeatedly admonished Husband and/or Wife to refrain from abusing one another either physically or verbally, or from discussing the divorce with the children. At various times, it issued show cause orders to Husband or to Wife to show why he or she should not be held in civil contempt. It threatened the parties with criminal penalties for repeated failure to obey court orders. The court twice held Husband in contempt and sentenced him to six months in jail, suspending the sentence if he complied with certain conditions. It found Wife to have violated court orders to take a child to counseling, but did not find willful contempt. The court also entered judgment for $275.00 in favor of Husband and against Wife's Attorney for failure to appear at a hearing, but later set aside the judgment. The parties filed numerous motions to compel the other party to obey court orders and for sanctions. These motions included allegations of parenting inadequacies and the failure to comply with shared custody orders, to provide financial information, to pay sums ordered by the court for day care and other expenses, or to divide the family pictures and Disney videos.
{5} The dispute over the passports arose in the following context. On February 6, 1998, Husband complained that Wife had not delivered the children's passports to the guardian ad litem and asked for sanctions for this and other alleged improper actions. On February 9, 1998, the court entered a written order for the guardian ad litem to keep the children's passports. On February 10, 1998, in the final divorce decree, the court forbade the parties from "remov[ing] the children from the jurisdiction of the state of New Mexico and specifically the United States without prior court approval." The court ordered Husband to file a motion in February or March 1998 for permission to take the children to Tunisia if the parties were unable to agree on such a trip.
{6} Wife did not give the passports to the guardian ad litem, but Husband did not bring this failure to the court's attention until July 8, 1998. On that date, Husband also moved, more than three months past the deadline the court had given him for such a request, for permission to take the three children to Tunisia to attend a family wedding occurring on August 7, 1998, with a scheduled departure date of July 14, 1998. It appears that Husband made the travel reservations July 1, 1998. At a hearing held on July 13, 1998, Wife's Attorney admitted to the court that through her oversight, Wife did not give the children's passports to the guardian ad litem. After that hearing, the court ordered that the oldest child could travel with Husband and required Wife to deliver that child's passport to Husband and the other two children's passports to the guardian ad litem.
{7} The oldest child's passport had expired by the time it was given to Husband. Husband *897 bought new tickets for himself and the child after Child's passport was renewed, but had to pay additional money for the tickets because he did not have time to take advantage of advance-purchase discounts. Husband did not seek repayment for this extra money from Wife or Wife's Attorney in Chaara v. Chaara. Rather, he filed this separate lawsuit against Wife's Attorney in the magistrate court of Sandoval County on May 3, 1999.
{8} The magistrate court dismissed Husband's action against Wife's Attorney. Husband appealed to the district court. Wife's Attorney filed a motion for summary judgment and for sanctions, asking that the lawsuit be dismissed "because all acts complained of took place during and attendant to [Husband's] divorce case in which [Wife's Attorney] served as counsel for his party-opponent, [Wife]." The district court denied the motion. After a jury trial, the district court entered judgment for Husband against Wife's Attorney for compensatory damages of $2779.61, punitive damages of $1.00, and costs of $259.00.
{9} Wife's Attorney appeals, contending that Husband is precluded by the parties' mutual involvement in Chaara v. Chaara from bringing this lawsuit. We hold that Husband is precluded by the doctrine of res judicata, or claim preclusion, from bringing this separate action against Wife's Attorney and reverse.

Application of Res Judicata
{10} "Claim preclusion, or res judicata, bars subsequent actions involving the same claim, demand or cause of action." Wolford v. Lasater, 1999-NMCA-024, ¶ 5, 126 N.M. 614, 973 P.2d 866 (internal quotation marks and citation omitted). The purpose of res judicata is to "relieve parties of the cost and vexation of multiple lawsuits, conserve judicial resources, and, by preventing inconsistent decisions, encourage reliance on adjudication." Allen v. McCurry, 449 U.S. 90, 94, 101 S.Ct. 411, 66 L.Ed.2d 308 (1980). The application of res judicata to bar a party's claims is a question of law which we review de novo. See Anaya v. City of Albuquerque, 1996-NMCA-092, ¶ 5, 122 N.M. 326, 924 P.2d 735 (stating standard of review). We apply res judicata when all of the following elements are established: "`(1) identity of parties or privies, (2) identity of capacity or character of persons for or against whom the claim is made, (3) ... same cause of action, and (4) ... same subject matter.'" Wolford, 1999-NMCA-024, ¶ 5, 126 N.M. 614, 973 P.2d 866, (quoting City of Las Vegas v. Oman, 110 N.M. 425, 432, 796 P.2d 1121, 1128 (Ct.App.1990)).
{11} The requirements of the first element were met in this case because Husband was a party in both actions and Wife's Attorney was in privity with Wife. See In re Richards, 1999-NMSC-030, ¶ 19, 127 N.M. 716, 986 P.2d 1117. Our Supreme Court discussed the nature of privity in an attorney-client relationship in In re Richards. Richards, an attorney, was disciplined by the Supreme Court, in part for filing a lawsuit against attorneys who represented GE Capital Mortgage Services, Inc. (GE Capital), in a foreclosure action against his client. Id. ¶¶ 2, 19. In that lawsuit, Richard's client was required to pay GE Capital's attorney fees. Id. ¶ 15. She paid the fees without challenging the amount. Id. On behalf of his client, Richards filed a second action in magistrate court against GE Capital's attorneys alleging that they owed his client a refund of the fees assessed to her in the foreclosure action. Id. ¶ 16. The magistrate court dismissed the action. Id. Richards was subjected to disciplinary claims as a result of filing the magistrate court action. Id. ¶ 14. The Supreme Court agreed with the disciplinary board that "a lawyer of ordinary competence would recognize [that] the well-established doctrines of collateral estoppel and res judicata would bar the magistrate [court] proceeding." Id. ¶ 17 (internal quotation marks and citation omitted). The Court held that GE Capital and its attorneys were in privity and that Richards should have raised any objections to GE Capital's attorneys fees in the foreclosure action. Id. ¶¶ 18-19. Similarly, Wife and Wife's Attorney in this case are in privity.
{12} The second element of res judicata exists because Husband and Wife's Attorney had the same identity of capacity in both actions. See Three Rivers Land Co. v. Maddoux, *898 98 N.M. 690, 694, 652 P.2d 240, 244 (1982), overruled on other grounds by Universal Life Church v. Coxon, 105 N.M. 57, 728 P.2d 467 (1986). Husband acted on his own behalf. Wife's Attorney acted as Wife's counsel in the first domestic relations action and was being sued in that capacity in this action.
{13} The fourth element was met because both actions concerned the same subject matter: the failure to turn over the children's passports in a timely manner.
{14} Satisfaction of the third element, that the two actions concerned the same cause of action, is less obvious. Our Supreme Court has adopted the analysis set forth in the Restatement (Second) of Judgments §§ 24, 25 (1980) for guidance in determining "what constitutes a cause of action for res judicata purposes." Three Rivers Land Co., 98 N.M. at 695, 652 P.2d at 245. Those sections, as quoted by the Court, are:
§ 24. Dimensions of "Claim" for Purposes of Merger or BarGeneral Rule Concerning "Splitting"
(1) When a valid and final judgment rendered in an action extinguishes the plaintiff's claim pursuant to the rules of merger or bar * * *, the claim extinguished includes all rights of the plaintiff to remedies against the defendant with respect to all or any part of the transaction, or series of connected transactions, out of which the action arose.
(2) What factual grouping constitutes a "transaction", and what groupings constitute a "series", are to be determined pragmatically, giving weight to such considerations as whether the facts are related in time, space, origin, or motivation, whether they form a convenient trial unit, and whether their treatment as a unit conforms to the parties' expectations or business understanding or usage.
§ 25. Exemplifications of General Rule Concerning Splitting
The rule of § 24 applies to extinguish a claim by the plaintiff against the defendant even though the plaintiff is prepared in the second action.
(1) To present evidence or grounds or theories of the case not presented in the first action, or
(2) To seek remedies or forms of relief not demanded in the first action.
Id. (internal quotation marks and citation omitted).
{15} Thus, claims present the same "cause of action" for purposes of res judicata if they arise out of the same "transaction, or series of connected transactions." Id. In determining whether claims arise out of the same transaction, we consider the relatedness of the facts, trial convenience, and the parties' expectations. Anaya, 1996-NMCA-092, ¶ 12, 122 N.M. 326, 924 P.2d 735 (summarizing factors to be considered).
{16} The facts Husband raised are related in time, origin, and motivation. His grievance against Wife's Attorney arose out of the litigation between Husband and Wife. Husband himself made this clear in Chaara v. Lander:
[Husband's] Original COMPLAINT [in Chaara v. Lander] stems directly from [Wife's Attorney's] willful, calculated, planned, and intentional actions not to obey Court Orders, in an attempt to obstruct justice regardless of the Court's decisions. The Defendant, [Wife's Attorney], must be held responsible for her continuous violations of Court Orders and for her disregard of the Code of Professional Conduct and Ethics and pay for the damage caused by her own well thought of actions.
After Husband moved in Chaara v. Chaara on July 8, 1998 to enforce the court's order directing Wife to deliver the children's passports to the guardian ad litem, Wife's Attorney asserted at the July 13, 1998 hearing that Wife was not at fault in the matter of the passports, as Wife's Attorney failed to deliver them due to an "oversight" on the part of Wife's Attorney. The transaction was the same despite the fact that Husband sought a form of relief in the second lawsuit which he did not seek in the first. See Ford v. N.M. Dep't of Pub. Safety, 119 N.M. 405, 413, 891 P.2d 546, 554 (Ct.App.1994) (noting that Comment c of Restatement § 24 explains that a "[t]ransaction may be single despite different harms, substantive theories, *899 measures or kinds of relief") (emphasis omitted).
{17} Unquestionably, trial convenience weighs in favor of resolving Husband's dispute against Wife's Attorney within the domestic relations litigation. Husband's complaint that Wife's Attorney was disobeying court orders and that he was damaged as a result, should have been brought in the action in which the orders were disobeyed and in which the factfinder had access to the whole context of the dispute between the parties, including Husband's failure to timely move for permission to travel and the parties' multiple requests for sanctions against one another. The judge in Chaara v. Chaara could have expeditiously resolved the dispute, saving time and/or expense for the trial court and jury which actually heard this matter, as well as for the parties.
{18} Moreover, Wife's Attorney had reason to expect that Husband's claims against her related to her representation of Wife would be raised in the domestic relations action. Husband's expectations that he could pursue Wife's Attorney in a separate action are outweighed by the interest of the courts and Wife's Attorney in bringing litigation to a close. Cf. Anaya, 1996-NMCA-092, ¶ 17, 122 N.M. 326, 924 P.2d 735 ("Nor can we say that the courts' and Defendants' interests in bringing litigation to a close outweigh Plaintiff's interest in the vindication of his claims."). We note that Husband apparently had plans for at least one other lawsuit against Wife's Attorney. In his response to Wife's Attorney's motion for a new trial, he stated, "This court has only seen a FRACTION of the TIP of the ICEBURG [sic], as she had violated EVERY single order multiple times (over thirty of them) and has caused [Husband] a loss of over $60,000 which he will win in a different court and this Motion is going to be a great deal of help in supporting his suit against her." This kind of repeated litigation is precisely the problem the doctrine of res judicata is designed to prevent.
{19} Husband raises distinctions between the two lawsuits, which, although true, do not affect the applicability of res judicata in this case. First, although Husband's claims in Chaara v. Lander were decided by a jury, whereas the trial judge would have been the factfinder in Chaara v. Chaara, there is generally no right to a jury trial when a party is seeking sanctions or urging that someone be held in contempt. Cf. In re Herkenhoff, 122 N.M. 766, 769, 931 P.2d 1382, 1385 (1997) (holding that there is no right to jury trial for contempt charges except where potential criminal sanctions exceed six months in jail or a fine of more than $1000).
{20} In addition, Husband correctly asserts that he did not raise the question of his damages in Chaara v. Chaara. Indeed, he could not have raised it at the time of the July 13, 1998 hearing on the issues of the children's travel and location of their passports because he did not know at that time that the oldest child's passport had expired or how much extra it would cost him to obtain tickets to the family wedding in Tunisia. Nor did Husband know at that time that the district court would not hear his motion for sanctions against Wife's Attorney. Nevertheless, Husband could have brought his damages to the attention of the district court in Chaara v. Chaara, and, if dissatisfied with the court's decision, could have appealed that decision to this Court at the same time he appealed the child support orders. The doctrine of res judicata applies equally to all claims arising out of the same transaction, regardless of whether they were raised at the earlier opportunity, as long as they could have been raised. Ford, 119 N.M. at 414, 891 P.2d at 555; see also Garcia v. Rodey, Dickason, Sloan, Akin & Robb, P.A., 106 N.M. 757, 763, 750 P.2d 118, 124 (1988) ("Within the action out of which a grievance arises, remedies are provided for the benefit and relief of parties wronged through reasonable reliance upon misrepresentations of an adversary's attorney.").
{21} Husband further asserts that Wife's Attorney's alleged disregard of court orders will go unpunished if this decision is not allowed to stand. We point out that Husband also had the right and the opportunity to report Wife's Attorney to the disciplinary board. "[T]he Rules of Professional Conduct provide the framework for the ethical practice *900 of law. Failure to abide by the rules is the basis for invoking disciplinary proceedings." Garcia, 106 N.M. at 763, 750 P.2d at 124. Under appropriate circumstances, disciplinary sanctions of attorneys may include restitution. Rule 17-206(C) NMRA 2002. If there is an impropriety and it is not addressed, it is because Husband failed to seek the correct remedy within the lawsuit in which his grievance arose or with the disciplinary board. Res judicata bars Husband's claims.

Review of Denial of Summary Judgment Motion
{22} As a procedural matter, Husband argues that the denial of Wife's Attorney's motion for summary judgment is not reviewable on appeal. He relies on Green v. General Accident Insurance Co., 106 N.M. 523, 527, 746 P.2d 152, 156 (1987) for the proposition that "[i]f a summary judgment motion is improperly denied, the error is not reversible for the result becomes merged in the subsequent trial". Accord Home Indemnity Co. v. Reynolds & Co., 38 Ill.App.2d 358, 187 N.E.2d 274, 278 (1962). Both Green and Home Indemnity Co. are distinguishable because they concerned fact-based motions and the facts in issue were decided against the movant at a trial on the merits. In this case, the summary judgment motion presented an issue of law, supported by pleadings filed in the previous lawsuit. The issue was correctly not presented to the jury. The denial of the summary judgment motion was not merged in the jury's verdict. See Gallegos v. N.M. Bd. of Educ., 1997-NMCA-040, ¶¶ 8-12, 123 N.M. 362, 940 P.2d 468 (holding that if denial of motion for summary judgment is based solely on a purely legal issue, which cannot be submitted to the trier of fact, and resolution of which is not dependent on evidence submitted to trier of fact, issue should be reviewable on appeal from final judgment).
{23} "Summary judgment is appropriate where there are no genuine issues of material fact and the movant is entitled to judgment as a matter of law." Self v. United Parcel Serv., Inc., 1998-NMSC-046, ¶ 6, 126 N.M. 396, 970 P.2d 582. There was no genuine issue of material fact as to what had happened in Chaara v. Chaara. The only dispute was the legal significance of those facts. The court erred as a matter of law in failing to grant Wife's Attorney summary judgment on the grounds that Husband's lawsuit was precluded by the parties' mutual involvement in Chaara v. Chaara. Its denial of the motion is subject to review.
{24} We address the parties' other contentions in a memorandum opinion filed contemporaneously with this opinion.

Conclusion
{25} Husband could have pursued his grievances against Wife's Attorney in Chaara v. Chaara or in a disciplinary proceeding. Principles of res judicata preclude Husband from bringing this separate lawsuit against Wife's Attorney. We reverse the judgment against Wife's Attorney.
{26} IT IS SO ORDERED.
WE CONCUR: RICHARD C. BOSSON, Chief Judge and MICHAEL D. BUSTAMANTE, Judge.
