OPINION
EVELYN V. KEYES, Justice.Appellant, American International Industries, Inc. (“All”), appeals the trial court’s summary judgment in favor of ap-pellees, Phillip Scott, Surgieare, Inc., and Keith G. LeBlanc (collectively, “Surgi-care”). In four issues, All argues that the trial court erred in (1) granting Surgicare’s traditional motion for summary judgment on its res judicata defense and on All’s claims for breach of contract, declaratory relief, and suit to remove a cloud on the title to real property; (2) granting Surgi-care’s no-evidence motion for summary judgment, to the extent that it did so, because (a) Surgieare failed to specify the elements of All’s claims for which Surgi-care asserted there was no evidence, (b) Surgieare bore the burden of proof on its res judicata defense, and (c) All’s declaratory judgment and breach of contract claims raised purely legal issues; (8) awarding attorney’s fees to Surgieare, because (a) the trial court improperly granted summary judgment and (b) Surgicare’s counsel failed to properly segregate recoverable fees; and (4) striking the affidavits of All’s corporate representative and attorney.
We affirm.
Background
In 2003, Surgieare and Vincent Giam-malva entered into an earnest money contract for the sale of a piece of property located in Chambers County, Texas. The deal between them fell through, and Giam-malva filed suit against Surgieare on November 20, 2003. See Vincent A. Giam-malva v. Surgieare, Inc. et al., No. 20867, 2006 WL 5541012 (344th District Court, Chambers County, Tex. Nov. 13, 2006) (“the Giammalva case”).
In June 2004, Surgieare and All entered into a separate agreement in which Surgi-care agreed to sell to All five properties, including the Chambers County property that was the subject of the Giammalva case (the “real estate agreement”). As part of the real estate agreement, All agreed to indemnify Surgieare for its attorney’s fees and expenses in the Giam-malva case. Around this same time, AII and Surgieare also entered into another agreement whereby All acquired Surgi-care stock (the “stock agreement”).
On March 28, 2005, Surgieare filed a cross-action against AII in the Giammalva case seeking contractual contribution and indemnity under the real estate agreement.
On July 12, 2005, AII filed suit against Surgieare in Harris County, alleging that Surgieare had breached the stock agreement and had committed securities fraud.
*158See Am. Intern’l Indus., Inc. v. Orion HealthCorp, Inc., f/k/a Surgicare, Inc., et al, No. 2005-44326 (80th District Court, Harris County, Tex., September 8, 2006) (“the All securities case”).
Eventually, all of the claims in the Giam-malva case were resolved except for Surgi-care’s claim for indemnity from All under the real estate agreement. The trial court determined on February 2, 2006, that All was liable for indemnification of Surgi-care’s losses in the Giammalva case, including reasonable and necessary attorney’s fees and expenses. A bench trial on the issue of the amount of reasonable and necessary attorney’s fees occurred on March 21, 2006.
On September 8, 2006, in connection with the All securities case, the parties entered into a settlement agreement (the “settlement agreement in the All securities case”). Surgicare and the other settling defendants paid All $750,000, and the parties agreed to release their claims against each other. This agreement resulted in the dismissal with prejudice of the All securities case.
On November 13, 2006, the trial court in the Giammalva case awarded Surgicare $60,513.50 as reasonable and necessary attorney’s fees, $3,420 as reasonable and necessary expenses, post-judgment interest, and $17,500 as reasonable and necessary attorney’s fees in the event of an unsuccessful appeal by All. All appealed the Giammalva case to this Court, but it did not originally file a supersedeas bond. All did not present the September 8, 2006 settlement agreement in the All securities case to the trial court in the Giammalva case or to this Court as part of its appeal of the Giammalva case. All did not argue that the September 8, 2006 settlement agreement from the All securities case released Surgicare’s indemnity claims under the real estate agreement in the Giam-malva case.
While All’s appeal of the Giammalva case was pending, Surgicare took steps to enforce the trial court’s judgment in its favor in that case by ordering and recording an abstract of judgment and taking steps toward obtaining a writ of execution. All eventually posted a supersedeas bond, and Surgicare suspended its efforts to collect on the judgment in the Giammalva case while the appeal was pending in this Court.
This Court affirmed the trial court’s award of attorney’s fees in the Giammalva case in an opinion issued on July 17, 2008. See Am. Intem’l Indus., Inc. v. Surgicare, Inc., No. 01-07-00116-CV, 2008 WL 2756601 (Tex.App.-Houston [1st Dist.] July 17, 2008, no pet.) (mem. op).
On January 23, 2009, All filed a new suit against Surgicare in Chambers County, Texas (the instant case), seeking a declaratory judgment that under the September 8, 2006 settlement agreement in the All securities case, Surgicare had released all of its claims against All in the Giammalva case, including its claim for indemnity in the Giammalva case. All also alleged that Surgicare had breached the settlement agreement in the All securities case, that Surgicare was required to indemnify All under the terms of the settlement agreement in that case, and that it was entitled to remove the cloud on the title to the property on which Surgicare had recorded its abstract of judgment in the Giammalva case.1 Surgicare answered, arguing that the doctrine of res judicata barred All’s claims and seeking *159attorney’s fees under the Uniform Declaratory Judgment Act.
Surgicare moved for summary judgment asserting both traditional and no-evidence grounds. Surgicare argued that All’s claims relating to the release of Surgi-care’s claims included in the September 8, 2006 settlement agreement in the All securities case were barred by the doctrine of res judicata and that it was entitled to judgment as a matter of law on All’s declaratory judgment and breach of contract claims in the instant case. Surgicare also argued that All’s indemnification claims in the instant case were barred because the settlement agreement in the All securities case did not include an enforceable indemnity provision and that All’s action to remove a cloud on its title in the instant case was barred because Surgicare did “not do[] anything it was not legally permitted to do in the context of obtaining the writ of execution and the abstracts of judgment.” Finally, Surgi-care argued that it was entitled to attorney’s fees in the instant case under the Uniform Declaratory Judgment Act, and counsel for Surgicare provided an affidavit in support of Surgicare’s claim for attorney’s fees.
All responded to the motion for summary judgment and attached the affidavit of Daniel Dror, a corporate representative of All, who attested to various facts supporting All’s claims, and the affidavit of Jerry Shutza, All’s counsel, regarding attorney’s fees. All also objected to Surgi-care’s evidence as to attorney’s fees “because it fail[ed] to segregate the time and fees between causes of action, defense, and remedies sought.”
On Surgicare’s motion, the trial court struck Dror’s and Shutza’s affidavits and ordered “that [Surgicare’s] Motion for Summary Judgment is in all things GRANTED,” that All “take nothing by its action,” “that the doctrine of res judicata applies in this case and thus all of [All’s] claims arising under the September 2006 Settlement Agreement between the parties, among others, are hereby forever extinguished.” The trial court also awarded Surgicare $44,785.37 in attorney’s fees and litigation expenses, with additional attorney’s fees contingent upon an unsuccessful appeal.
Summary Judgments
In its first issue, All challenges the trial court’s summary judgment in favor of Sur-gicare on its res judicata defense.
A. Standard of Review
We review a trial court’s grant of summary judgment de novo. Provident Life & Accident Ins. Co. v. Knott, 128 S.W.3d 211, 215 (Tex.2003). To prevail on a traditional summary judgment motion, the mov-ant has the burden of proving that it is entitled to judgment as a matter of law and that there are no genuine issues of material fact. Tex.R. Civ. P. 166a(c); Cathey v. Booth, 900 S.W.2d 339, 341 (Tex. 1995). Res judicata is an affirmative defense. Tex.R. Civ. P. 94; W. Dow Hamm III Corp. v. Millennium Income Fund, L.L.C., 237 S.W.3d 745, 755 (Tex.App.Houston [1st Dist.] 2007, no pet.). A defendant is entitled to summary judgment based upon an affirmative defense when the defendant proves all elements of the affirmative defense. Henry v. Masson, 333 S.W.3d 825, 843-44 (Tex.App.-Houston [1st Dist.] 2010, no pet.) (citing Havlen v. McDougall, 22 S.W.3d 343, 345 (Tex. 2000)). When, as here, the trial court’s summary judgment order does not state the basis for the trial court’s decision, we must uphold the order if any of the theories advanced in the motion are meritorious. Knott, 128 S.W.3d at 216.
*160B. Res Judicata
Surgicare argues that All’s claims are barred by the doctrine of res judicata. All argues that Surgicare failed to establish its entitlement to summary judgment on this affirmative defense. AJI argues that res judicata does not apply to its claims because it is attacking actions taken to collect the judgment in the Giammalva case after the final judgment was rendered; thus, because the complained-of acts occurred after the trial court rendered final judgment, its claims in the instant case arising from those acts could not have been brought in the previous litigation. We disagree with All.
Although All claims that it is raising issues that could not have been brought in the Giammalva case, it is in reality attempting to assert the defense of release. See C/S Solutions, Inc. v. Energy Maint. Servs. Group, LLC, 274 S.W.Sd 299, 306-07 (Tex.App.-Houston [1st Dist.] 2008, no pet.) (examining substance of party’s “nonsuit” in determining it was actually amended pleading) (citing State Bar v. Heard, 603 S.W.2d 829, 833 & n. 5 (Tex.1980) (“We look to the substance of a plea for relief to determine the nature of the pleading, not merely at the form of title given to it.”)); Pickett v. Brooks, 846 S.W.2d 421, 424 n. 5 (Tex.App-Austin 1992, writ denied) (holding that court must ascertain the true nature of plaintiffs claims and not exalt form over substance). Release is an affirmative defense. Tex.R. Civ. P. 94. A release is a writing which provides that a duty or obligation owed to one party to the release is discharged immediately or upon the occurrence of a condition. Henry, 333 S.W.3d at 843-44. A release of a claim or cause of action extinguishes the claim or cause of action. Id. (citing Dresser Indus., Inc. v. Page Petroleum, Inc., 853 S.W.2d 505, 508 (Tex.1993)).
Res judicata precludes the reliti-gation of a finally adjudicated claim and related matters that should have been litigated in a prior suit. State & Cnty. Mut. Fire Ins. Co. v. Miller, 52 S.W.3d 693, 696 (Tex.2001) (citing Ban v. Resolution Trust Corp., 837 S.W.2d 627, 628 (Tex.1992)). The doctrine bars matters actually litigated and causes of actions or defenses that arise out of the same subject matter and that could have been litigated in the first suit. Barr, 837 S.W.2d at 630. “[A] claimant generally cannot pursue one remedy to an unfavorable conclusion and then pursue the same remedy in another proceeding before the same or a different tribunal.” Igal v. Brightstar Info. Tech. Group, Inc., 250 S.W.3d 78, 86 (Tex.2007). Texas follows the transactional approach to res ju-dicata, which requires that a defendant bring as a counterclaim any claim arising out of the transaction or occurrence that is the subject matter of the opposing party’s suit. Miller, 52 S.W.3d at 696. For res judicata to apply, these elements must be present: (1) a prior final judgment on the merits by a court of competent jurisdiction; (2) the same parties or those in privity with them; and (3) a second action based on the same claims as were raised or could have been raised in the first action. Igal, 250 S.W.3d at 86.
Here, the November 13, 2006 judgment in the Giammalva case awarding Surgicare attorney’s fees and expenses is a prior final judgment on the merits by a court of competent jurisdiction. Furthermore, neither party in the present ease contests that they are the same parties subject to the judgment in the Giammalva case. The dispute arises over the third element— whether this present case is based on claims that were raised or could have been raised in the Giammalva case.
All cites Compania Financiara Libano, S.A. v. Simmons, 53 S.W.3d 365 (Tex.*1612001), to support its argument that its current claims could not have been brought prior to the trial court’s entry of final judgment in the Giammalva case because Surgicare did not breach the September 2006 settlement agreement — by attempting to enforce the Giammalva case’s judgment — until after that judgment was entered. However, Compañía is distinguishable from the instant case. In Compania, the parties reached a settlement agreement in the original lawsuit, concurrently with the judgment, which anticipated that the parties would perform certain acts in the future to resolve the original dispute. Id. at 367. The plaintiff in Com-pañía brought the second suit when the other party failed to perform the future acts stipulated in their agreement. Id. Here, however, the September 2006 settlement agreement in the All securities case was formed months before judgment was entered in the Giammalva case, and the settlement agreement did not contemplate any future performance regarding the Gi-ammalva case.
The substance of All’s pleadings shows that its claims in the instant case for declaratory judgment, breach of contract, indemnity, money had and received, and removal of a cloud on its title to real property are all premised on its contention that the September 8, 2006 settlement agreement in the All securities case released Surgicare’s claims for indemnity in the Giammalva real estate case. The Giammalva case had been filed and was pending at the time the release was executed in the All securities case. Therefore, AII could have presented its argument regarding Surgicare’s alleged release of its claim for indemnity to the trial court in the Giammalva case before it entered its November 13, 2006 judgment in favor of Surgicare, but All did not do so. Nor did it raise the issue of release in its appeal of the Giammalva judgment to this Court. Because this affirmative defense of release could have been brought in the prior litigation, it is now barred by res judicata. See Miller, 52 S.W.3d at 696; see also Barr, 837 S.W.2d at 630 (“The scope of res judicata is not limited to matters actually litigated; the judgment in the first suit precludes a second action by the parties and their privies not only on matters actually litigated, but also on causes of action or defenses which arise out of the same subject matter and which might have been litigated in the first suit.”) (original emphasis omitted).
Thus, Surgicare established as a matter of law that res judicata barred all of All’s claims in the instant case because each claim was contingent on All’s argument that Surgicare released its claims against AII and then attempted to enforce the Giammalva judgment in contravention of that agreement. The trial court did not err in granting summary judgment on this ground and ordering that All take nothing on its claims. See Henry, 333 S.W.3d at 843-44.
Because we conclude that the trial court’s summary judgment was proper on this ground, we do not address All’s second issue concerning Surgicare’s no-evidence motion for summary judgment.
We overrule AH’s first and second issues.
Attorney’s Fees
In its third issue, All challenges the trial court’s award of attorney’s fees by arguing that the trial court improperly granted Surgicare’s motion for summary judgment on All’s declaratory judgment claim. Because we have determined that the trial court’s summary judgment was proper, we overrule this part of All’s third issue.
*162All also argues that the award of attorney’s fees was improper because Sur-gicare’s attorney failed to properly segregate the recoverable fees. Attorney’s fees are recoverable only when provided for by statute or by the parties’ agreement. Doss v. Homecomings Fin. Network, Inc., 210 S.W.3d 706, 711 (Tex.App.-Corpus Christi 2007, pet. denied) (citing Dallas Cent. Appraisal Dist. v. Seven Inv. Co., 835 S.W.2d 75, 77 (Tex.1992)). Surgieare sought attorney’s fees for defending against All’s claims under the Uniform Declaratory Judgment Act (“UDJA”). Reasonable and necessary attorney’s fees may be awarded in any proceeding utilizing the UDJA if they are equitable and just. Id. at 711-12; see Tex. Civ. Prac. & Rem.Code Ann. § 37.009 (Vernon 2008) (“In any proceeding under this chapter, the court may award costs and reasonable and necessary attorney’s fees as are equitable and just.”).2
“The UDJA is a procedural device for deciding cases already within a court’s subject matter jurisdiction.” Doss, 210 S.W.3d at 712 (citing Tex. Civ. Prac. & Rem.Code Ann. §§ 37.001-.011 (Vernon 2008) and State v. Morales, 869 S.W.2d 941, 947 (Tex.1994)). “A litigant’s request for declaratory relief cannot confer jurisdiction on the court, nor can it change the basic character of a suit.” Id. (citing Morales, 869 S.W.2d at 947). The UDJA provides:
A person interested under a deed, will, written contract, or other writings constituting a contract or whose rights, status, or other legal relations are affected by a statute, municipal ordinance, contract, or franchise may have determined any question of construction or validity arising under the instrument, statute, ordinance, contract, or franchise and obtain a declaration of rights, status, or other legal relations thereunder.
Tex. Crv. Prac. & Rem.Code Ann. § 37.004.
We review a trial court’s award of attorney’s fees for an abuse of discretion. Bocquet v. Herring, 972 S.W.2d 19, 21 (Tex.1998); see also Gilbert v. City of El Paso, 327 S.W.3d 332, 336 (Tex.App.-El Paso 2010, no pet.) (“An award of attorney’s fees under the UDJA is within the trial court’s discretion.”). A trial court abuses its discretion when it acts without regard for any guiding rules or principles. Owens-Corning Fiberglas Corp. v. Malone, 972 S.W.2d 35, 43 (Tex.1998). In Tony Gullo Motors I, L.P. v. Chapa, the Texas Supreme Court held that parties claiming attorney’s fees must “segregate fees between claims for which they are recoverable and claims for which they are not” and are “required to show that attorney’s fees were incurred while suing the defendant sought to be charged with the fees on a claim which allows recovery of such fees.” 212 S.W.3d 299, 311 (Tex.2006) (quoting Stewart Title Guar. Co. v. Sterling, 822 S.W.2d 1, 10 (Tex.1991)). “Intertwined facts” do not make fees for unrecoverable claims recoverable. Id. at 313-14. “[I]t is only when discrete legal services advance both a recoverable and unrecoverable claim that they are so intertwined that they need not be segregated.” Id. Thus, “[i]f any attorney’s fees relate solely to a claim for which such fees are unrecoverable, the claimant must segregate recoverable from unrecoverable fees.” 7979 Airport Garage, L.L.C. v. Dollar Rent A Car Sys., Inc., 245 S.W.3d 488, 506 (Tex.App.*163Houston [14th Dist.] 2007, pet. denied) (citing Chapa, 212 S.W.3d at 313-14). The supreme court in Chapa further stated,
There may, of course, be some disputes about fees that a trial or appellate court should decide as a matter of law. For example, to prevail on a contract claim a party must overcome any and all affirmative defenses (such as limitations, res judicata, or prior material breach), and the opposing party who raises them should not be allowed to suggest to the jury that overcoming those defenses was unnecessary. But when, as here, it cannot be denied that at least some of the attorney’s fees are attributable only to claims for which fees are not recoverable, segregation of fees ought to be required ....
Chapa, 212 S.W.3d at 314 (emphasis added).
Attorneys are not required to keep separate time records when drafting parts of a petition or completing other tasks that relate to claims for which attorney’s fees are unrecoverable. 7979 Airport Garage, 245 S.W.3d at 506 (citing Chapa, 212 S.W.3d at 313-14). Rather, an attorney may testify, for example, “that a given percentage of the drafting time would have been necessary even if the claim for which attorney’s fees are nonrecoverable had not been asserted.” Id. The party seeking to recover attorney’s fees bears the burden of demonstrating that segregation is not required. See Hong Kong Dev., Inc. v. Nguyen, 229 S.W.3d 415, 455 (Tex.App.-Houston [1st Dist.] 2007, no pet.).
Here, AII alleged that “the Settlement Agreement released all claims which existed at the time the Settlement Agreement was executed, which included the claims which had been asserted in the [Giammal-va case]” and sought a declaratory judgment that “all claims asserted by [Surgi-care] against All, including the judgment in the [Giammalva case] have been released.” All also alleged that Surgicare’s enforcement of the Giammalva judgment constituted a breach of the settlement agreement, that Surgicare agreed to indemnify All from all released claims, and that the abstracts of judgment filed by Surgicare in its efforts to collect on the Giammalva judgment “have placed a cloud on the title to all real property owned by All” and must “be stricken ... and removed as a cloud on the title to any and all real property owned by All.”
Surgicare generally denied All’s claims and asserted several affirmative defenses including collateral estoppel, res judicata, waiver, lack of due diligence, and unclean hands. Surgicare subsequently filed a motion for summary judgment arguing that All’s claims that the September 2006 settlement agreement released all of Surgi-care’s claims against All were barred by the doctrine of res judicata, that All’s indemnification claims in the instant case were barred because the settlement agreement in the All securities case did not include an enforceable indemnity provision, and that All’s action to remove a cloud on its title in the instant case was barred because Surgicare did “not do[] anything it was not legally permitted to do in the context of obtaining the writ of execution and the abstracts of judgment.” Surgicare sought attorney’s fees under the UDJA.
Surgicare argues that the actions it took in defending itself against All’s request for a judgment declaring that Surgicare released its claims in the Giammalva real estate case by executing the settlement agreement in the All securities case were inextricably intertwined with its defense against the rest of All’s claims in the instant case for breach of contract, indemnity, money had and received, and removal of a cloud on its title to real property *164because all of All’s claims were premised on the underlying argument of release and because all of those claims are addressed by Surgicare’s res judicata defense.
Surgicare’s attorney submitted an affidavit as summary judgment proof detailing the specific legal services provided and the total costs of those services, and she attached copies of the pleadings and various written motions and other evidence. The record reflects that all of the legal services outlined in the affidavit and sought as attorney’s fees would have been necessary even if the declaratory judgment claim had been the only claim asserted by All. All of Surgicare’s pleadings and motions were necessary to address the interpretation and application of the September 2006 settlement agreement’s provisions, which was properly the subject of All’s UDJA claim. See Tex. Civ. Prac. & Rem.Code Ann. § 37.004; Doss, 210 S.W.3d at 711-12. Thus, this is a dispute about legal fees that can be decided as a matter of law. See Chapa, 212 S.W.3d at 314. The affidavit of Surgicare’s attorney and the accompanying evidence support a conclusion that there were no attorney’s fees claimed that related solely to a claim for which such fees were unrecoverable — all of the attorney’s drafting time would have been necessary even if the claim for which attorney’s fees are nonrecoverable had not been asserted — so no segregation of fees was necessary. See Chapa, 212 S.W.3d at 313-14; 7979 Airport Garage, 245 S.W.3d at 506. We overrule All’s third issue.
Affidavits
In its fourth issue, All argues that the trial court erred in striking the affidavits of its corporate representative, Daniel Dror, and its attorney, Jerry Shutza. Because we have resolved All’s complaints as a matter of law, these evidentiary issues are moot.
We overrule AH’s fourth issue.
Conclusion
We affirm the trial court’s judgment.
. All also added a cause of action for "money had and received” in a subsequent amended petition.
. We also note that attorney’s fees are recoverable for claims arising out of an oral or written contract, like All’s claims for breach of contract and indemnity. See Tex. Civ. Prac. & Rem.Code Ann. § 38.001(8) (Vernon 2008) ("A person may recover reasonable attorney's fees from an individual or corporation, in addition to the amount of a valid claim and costs, if the claim is for ... an oral or written contract.”).