Challah 3:3-4
Challah 3:3
If she consecrated her dough before it was rolled and then redeemed it, it is obligated in challah. If she consecrated it after it was rolled and she then redeemed it, it is obligated in challah. If she consecrated her dough before it was rolled, then the Temple treasurer rolled it, after which she redeemed it, the dough is exempt from challah. Since it was exempt at the time when the obligation would take effect, it remains exempt.
Challah 3:4
Similarly, if a person consecrates his produce before it is obligated in tithes and redeems it, it is obligated in tithes. If he consecrates his produce after it is obligated in tithes and redeems it, it is obligated in tithes. If he consecrates his produce before its work is completed and the Temple treasurer completes its work, after which he redeems it, it is exempt from tithes. Since it was exempt at the time when the obligation would take effect, it remains exempt.