Markle, Judge. John Joseph Hildebrand, III brought a claim for mandamus against the City of Warner Robins, Georgia (“the City”), Mayor Randy Toms, and the members of the City Council (collectively, “the defendants”), seeking to compel them to abide by the City’s ordinances, rules, and procedures, as well as the terms of an oral agreement, regarding his demotion and other disciplinary actions imposed on him.[1] The trial court dismissed the complaint for failure to state a claim pursuant to OCGA § 9-11-12 (b) (6), and Hildebrand appeals. Because Hildebrand did not enumerate as error the trial court’s dismissal of the City, we affirm in part the trial court’s order with respect to the City. However, because the allegations of the complaint, viewed in the light most favorable to Hildebrand, do not preclude the possibility that he could introduce evidence that would entitle him to mandamus relief against the remaining parties, we reverse in part. A motion to dismiss for failure to state a claim upon which relief may be granted should not be sustained unless (1) the allegations of the complaint disclose with certainty that the claimant would not be entitled to relief under any state of provable facts asserted in support thereof; and (2) the movant establishes that the claimant could not possibly introduce evidence within the framework of the complaint sufficient to warrant a grant of the relief sought. If, within the framework of the complaint, evidence may be introduced which will sustain a grant of the relief sought by the claimant, the complaint is sufficient and a motion to dismiss should be denied. In deciding a motion to dismiss, all pleadings are to be construed most favorably to the party who filed them, and all doubts regarding such pleadings must be resolved in the filing party’s favor. (Citation omitted.) Quarters Decatur, LLC v. City of Decatur, 347 Ga. App. 723, 724 (1) (820 SE2d 741) (2018). We review de novo the trial court’s grant of the City’s motion to dismiss. Sweet City Landfill, LLC v. Lyon, ___ Ga. App. ___ (835 SE2d 764, 769) (2019). Bearing these principles in mind, we turn to the allegations of the amended complaint.[2] Hildebrand was employed as a network administrator for the City, and was allowed access to all of the City’s offices and computer systems. Following an investigation into a suspicious Open Records Act request, he was suspended without pay and later discharged for, among other things, willfully giving false statements to his superiors or to the public, including the falsification of City records. Hildebrand appealed his termination, but, prior to an administrative hearing, he and his attorney met with Mayor Toms and the City attorney, and the parties orally agreed that he would be reinstated with no discipline, paid for the days he was on leave without pay, and reimbursed a portion of his attorney fees. The hearing was then canceled. Despite the agreement, after returning to work, Hildebrand was demoted and his access to certain departments restricted. He asserts that these adverse employment actions violate the City’s code of ordinances, which provides for notice and the opportunity of a hearing when an employee is so disciplined.[3] He further claims that he has not received the full back pay owed to him. Hildebrand’s complaint seeks the issuance of a writ of mandamus to compel the defendants to comply with the City’s ordinances, rules, and regulations regarding employment discipline, as well as to enforce the parties’ oral agreement. The defendants moved to dismiss the complaint for failure to state a claim under OCGA § 9-11-12 (b) (6). Notably, however, neither party attached certified copies of the applicable City ordinances to their pleadings, nor do the ordinances appear anywhere in the record. Following a hearing, the trial court granted the motion and dismissed Hildebrand’s complaint, finding that the City was not a proper party to the action pursuant to OCGA § 9-4-7 (b); Mayor Toms did not have a clear legal duty to carry out the requested relief; and Hildebrand failed to exhaust his administrative remedies. This appeal followed. In his sole enumeration of error, Hildebrand contends that the trial court’s dismissal of his mandamus action for failure to state a claim was in error. Specifically, he contends that he has a clear legal right to relief because the discipline is in contravention of the notice and hearing requirements set forth in the City’s ordinances. He further contends that he has no recourse to alternative legal remedies because the administrative grievance and hearing process is now foreclosed to him due to the outcome of the aborted termination process. We conclude that the trial court prematurely disposed of this action without proper consideration of the controlling law, namely the City’s code of ordinances. OCGA § 9-6-20 sets forth a remedy for unlawful governmental inaction: “[A]ll official duties should be faithfully performed, and whenever, from any cause, a defect of legal justice would ensue from a failure to perform or from improper performance, the writ of mandamus may issue to compel a due performance if there is no other specific legal remedy for the legal rights[.]” Quarters Decatur, LLC, 347 Ga. App. at 724 (1); see also Bibb County v. Monroe County, 294 Ga. 730, 734 (2) (755 SE2d 760) (2014). Mandamus relief is available “only if (1) no other adequate legal remedy is available to effectuate the relief sought; and (2) the applicant has a clear legal right to such relief.” (Citations omitted.) Bibb County, 294 Ga. at 734 (2). Importantly, “[w]hether a litigant has a clear legal right to the relief sought depends on the law governing the subject matter at issue.” Hansen v. DeKalb County Bd. of Tax Assessors, 295 Ga. 385, 387 (2) (761 SE2d 35) (2014). On its face, the complaint states a claim for mandamus. Hildebrand asserted that he has a property interest in his position with the City, and that he can only be disciplined in accordance with the procedures set forth in the City’s code. He further alleged that he has been demoted and otherwise disciplined without recourse to those procedures, and that the City is in violation of its own ordinances. Thus, Hildebrand alleged a clear legal right to relief. See Quarters Decatur, LLC, 347 Ga. App. at 726-27 (“A clear right to relief exists where an official or agency fails entirely to act or commits a gross abuse of discretion in performing a public duty that the official or agency is required by law to perform. Mandamus is the proper remedy when a governmental board fails to conduct a hearing as required by law.”) (citations omitted). Additionally, Hildebrand alleged that he has no adequate legal remedy. At this stage of the litigation, we must take these allegations as true. See Quarters Decatur, LLC, 347 Ga. App. at 724 (1). This is especially so due to the absence of the applicable ordinances from the record. See Hansen, 295 Ga. at 387 (2). Had they been attached to the pleadings in proper form and incorporated by reference, the trial court could have considered them on the City’s motion to dismiss. Babalola v. HSBC Bank, USA, N.A., 324 Ga. App. 750, 751, n. 4 (751 SE2d 545) (2013); OCGA § 9-11-10 (c); see also Lord v. Lowe, 318 Ga. App. 222, 224 (741 SE2d 155) (2012) (“If there is any discrepancy between the allegations in the complaint and the attached exhibits, the latter control.”) (citation omitted). Moreover, the trial court could not, nor may we, take judicial notice of the ordinances Hildebrand asserts as the basis for his mandamus claim. Whitfield v. City of Atlanta, 296 Ga. 641 (769 SE2d 76) (2015) (“City and county ordinances must be alleged and proven in order to be considered by the superior and appellate courts of this State. The proper method of proving a city ordinance is production of the original ordinance or a certified copy thereof.”) (citations omitted). And, although Hildebrand bears the ultimate burden of proving that a clear duty is imposed by the ordinances, Forsyth County v. White, 272 Ga. 619, 620 (2) (532 SE2d 392) (2000), at this stage of the litigation, when the relevant ordinances may still be introduced, we cannot say that he “could not possibly introduce evidence within the framework of the complaint sufficient to warrant a grant of the relief sought.”[4] Quarters Decatur, LLC, 347 Ga. App. at 724 (1). Additionally, without the ordinances, the trial court lacked authority to find that Hildebrand had no clear legal right to the relief he sought, and that he failed to exhaust his administrative remedies arising from them. “Neither the superior courts nor the appellate courts can adjudicate a claim or defense based on a city ordinance unless the ordinance has been properly presented.” (Citations omitted.) Whitfield, 296 Ga. at 641.[5] Because the ordinances were not properly before the trial court, the dismissal of Hildebrand’s mandamus claim pursuant to OCGA § 9-11-2 (b) (6) was premature. Nevertheless, Hildebrand neither enumerated as error nor argued in his brief before this Court that the trial court’s dismissal of the City pursuant to OCGA § 9-4-7 (b) was improper, and has thus failed to preserve this issue for appellate review. Pouncey v. Adams, 206 Ga. App. 126, 129 (2) (424 SE2d 376) (1992). We are therefore constrained to affirm the dismissal of the City, but otherwise reverse the trial court’s order granting the defendants’ motion to dismiss.[6] Judgment affirmed in part and reversed in part. Doyle, P. J., and Coomer, J., concur.