OPINION Relator, the State of Texas, petitions the Court for a writ of mandamus to compel the Honorable Selena Solis of the 243rd Judicial District Court of El Paso, Texas, to amend a judgment of conviction that granted criminal defendant Crispen Hanson jail time credit for time he spent released under an improper shock-probation order. We deny the petition for writ of mandamus. Background The full factual and procedural background of this case can be found in a previous opinion of this Court that was appealed to the Texas Court of Criminal Appeals and remanded to us for further consideration. State v. Hanson, No. 08-15-00205-CR, 2017 WL 3167484 (Tex.App.– El Paso July 26, 2017), rev’d, 555 S.W.3d 578 (Tex.Crim.App. 2018), on remand, State v. Hanson, No. 08-15-00205-CR, 2020 WL 1486852 (Tex.App.–El Paso March 27, 2020, pet. denied) (not designated for publication). The following truncated facts are relevant to this mandamus proceeding. In January 2015, pursuant to a plea bargain agreement, Hanson pleaded guilty to two counts of injury to a child. He did so in exchange for the State’s agreement to recommend concurrent eight-year prison sentences for those two counts. The trial court accepted the plea, but contrary to another term of the plea agreement, placed him on community supervision under former article 42.12, § 6 of the Texas Code of Criminal Procedure (authorizing the placement of a defendant on shock probation). The State pursued a direct appeal of the shock probation order, contending that it violated the negotiated terms of the plea agreement. After the case spent some time in the appellate pipeline, we reached the merits of that claim and agreed with the State. We then remanded the case to the trial court to reform the judgment of conviction and to calculate the appropriate credits for time served. State v. Hanson, 2020 WL 1486852, at *9 & n.10. On remand, Hanson argued that in considering the credit for time served, the trial court should give him jail-time credit from March 16, 2015, through his new sentencing date. Except for approximately a month, Hanson was out of jail on shock probation during this time. On December 14, 2021, in an “Amended Judgment of Conviction,” the trial court sentenced Hanson to 8 years of confinement, with 2,491 days of time-credit. The trial court apparently accepted Hanson’s position that he had a right to credit for the time when he was erroneously released from custody through no fault of his own.[1] The State did not file a direct appeal of the trial court’s amended judgment. The State did, however, on March 16, 2022, file this mandamus challenging the trial court’s determination of the credit given against the 8-year sentence. Discussion Generally, mandamus relief is appropriate only to correct a clear abuse of discretion or to compel performance of a ministerial duty, and where the relator has no adequate remedy by appeal. In re Reece, 341 S.W.3d 360, 364 (Tex. 2011) (orig. proceeding). The burden is on relator to show entitlement to mandamus relief. See In re Ford Motor Company, 165 S.W.3d 315, 317 (Tex. 2005) (orig. proceeding) (per curiam). The State argues in its petition that article 44.01 of the Texas Code of Criminal Procedure did not authorize it to appeal the trial court’s amended judgment. We disagree. Article 44.01(a)(2) gives the State the ability to appeal a trial court order that “arrests or modifies a judgment.” TEX.CODE CRIM.PROC.ANN. art. 44.01(a)(2). The Texas Court of Criminal Appeals in Collins v. State, 240 S.W.3d 925, 927-28 (Tex.Crim.App. 2007), held that the “State may appeal any order that modifies a ‘judgment,’” and that credit for time served is an element of the judgment. The Collins case was before the court on an improperly granted judgment nunc pro tunc, but the court held that “an order that modifies the amount of back-time received by a defendant . . . may be appealed by the State.” Id. The same is true here. The State could have filed a direct appeal challenging the trial court’s amended judgment, but it chose not to. Failing to timely exercise appellate rights precludes a writ of mandamus. See In re State of Texas ex rel. De Leon, 89 S.W.3d 195, 197 (Tex.App.–Corpus Christi Oct. 2, 2002, no pet.) (“Accordingly, we find that the State had an adequate remedy at law, which it failed to exercise in a timely manner.”). Accordingly, we deny the State’s petition for a writ of mandamus. JEFF ALLEY, Justice August 3, 2022 Before Rodriguez, C.J., Palafox, and Alley, JJ. (Do Not Publish)