Notwithstanding any other provision of law or rule of court to the contrary, when an original civil action, an appeal from the judgment of a court of general sessions, or a petition for review of a final decision in a contested case under the Uniform Administrative Procedures Act, compiled in title 4, chapter 5, is filed in a state or county court of record or a general sessions court and such court determines that it lacks jurisdiction, the court shall, if it is in the interest of justice, transfer the action or appeal to any other such court in which the action or appeal could have been brought at the time it was originally filed. Upon such a transfer, the action or appeal shall proceed as if it had been originally filed in the court to which it is transferred on the date upon which it was actually filed in the court from which it was transferred.