Fixture issue, migrate not working well with property setter

Hi everyone,

bench version 5.0.0
frappe version 12.11.0
erpnext version 12.13.0

Recently I just found out an issue with migrating using property setter in fixture in custom app.

Let me use an example to explain the issue as the subject stated.

  1. I need to hide the shipping_rule link field for sales invoice DocType. So I did that change on Customize Form, tick the checkbox “Hidden” for shipping_rule and update.
  2. In “Property Setter” List, I can see a document named “Sales Invoice-shipping_rule-hidden”, and the set_value is “1”.
  3. I can also see the JSON is written in property_setter.json in my custom app.
    image
  4. Then if I commit the changes in my dev app and deploy to my live app, then bench migrates runs great, it will tick the hidden checkbox for my live app.

However, if I decided that I need to undo that customization, I untick the hidden checkbox in my dev app and click updates. When I run bench export-fixtures, it will delete the JSON part.

As you guess it, when I commit the changes from dev to live, the live site didn’t update/reflect this change on live site. I know for performance reasons, ERPNext will not go through all the customize fields the site currently has, so it only goes through the ones recorded in JSON files in fixture folder.

I also know to a workaround which is just manually find the JSON and change the value to “0” so the live site will update correctly. But If I have a lot of custom fileds and property setter changes, it would be hard for me to manually go through these changes.

I know this might not be a very serious bug, but would be good if we can have a way to prevent this so that it’s more friendly for developers. Or if you have any ideas or comments, please let me know.

Thank you very much!

I am facing the same issue. Even with the v13 stable branch. Everytime i migrate, I loose property setter data, custom fields, naming series and also custom doc perm data

Hi @asoral, thanks for provding same feedback on your perspectives in V13 as I am not updating from V12 yet.

If they haven’t fixed this issue in V13, would you mind raise this issue in their GitHub Repository as well so that maybe we could draw more people’s attentions.

Hi @AOL
I am also facing this same issue in version v14 , did you find any solution for this

Thanks
Jecintha

I am using erpnext 15, the property setter list does not always reflect the customizations, i have made dozens of customizations and it does not show in the property setter list, i have refreshed, restarted bench and restarted pc, but it does not reflect and just to my surprise i noted that sometimes i make one hide/unhide a field it reflect.