Thanks for your question and the details of your tests; very helpful. You don’t say exactly how you “overwrite the existing file with this one“, but I assume you just replaced the original file with an FTP transfer or some other non-WordPress action.
I set a rule to map IPTC “2#120 caption-or-abstract” to the Caption field, setting Priority to “IPTC” and Existing Text to “Keep”. I added a new image to the Media Library and verified that the mapping rule was working.
I edited the image file, changing the IPTC value and overwriting the original file. I then ran the Media/Edit Media “Map IPTC/EXIF metadata” action; the initial Caption value was retained. I went to the Settings /Media Library Assistant IPTC/EXIF tab and ran the “Map All Attachments, Standard Fields Now” action; the initial Caption value was retained.
I edited and replace the image file with another new IPTC value. Then, I changed the Keep Existing setting to “Replace” and re-ran both the individual map and the map all actions. In both cases, the Caption field was updated.
As far as I can tell MLA is working as intended. However, there is a subtle “behavior” that may account for the results you got in your tests. Below the “Standard Fields” area you will see “You can also make temporary updates and click Map All Attachments, Standard Fields Now to apply the updates to all attachments without saving the rule changes.” If you change the Existing Text dropdown and click “Map all …” the updated setting will be used for that action but not saved. If you go back to the Media/Edit Media screen and do the individual “Map …” action you get the old, saved value of the Existing Text dropdown. It’s easy to get confused; it just happened to me in my testing.
I suppose I could add a “re-map everything unconditionally” action to the individual edit screen, but I am reluctant to further complicate an already complex MLA feature. I am open to your feedback; what do you think?
Regarding “overwriting the original file”, you may be interested in this earlier topic and the related topic it links to:
Not finding tags
Those topics are a reminder to be thoughtful and careful when messing with the natural WordPress order of things.
I am marking this topic resolved because MLA is working as it should. However, please let me know if you are still having trouble with Keep/Replace or other aspects of your IPTC mapping actions. Thanks for your interest in the plugin.