Skip to content

Conversation

@Gitesh307
Copy link
Contributor

@Gitesh307 Gitesh307 commented Nov 11, 2025

Fixes #4825

Cloning a Collection Object with CO_CREATE_COA_* enabled was creating a new blank CollectionObjectAttribute instead of preserving the original attribute values, which meant cloned COs did not produce an exact copy. The fix updates the auto-creation logic in scoping.ts to only generate a new COA when the record is newly created and has no existing attribute, while skipping COA creation during clone operations. As a result, cloned COs now retain their original CollectionObjectAttribute values, and new COs still automatically receive a COA when appropriate.

Note : Observed in tag v7.10.0; not reproducible on main. Please advise backport to the appropriate v7.10.x or v7.9.x.

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone

Testing instructions

  • Verify that cloning a Collection Object with existing COA values retains those values in the cloned record instead of creating a blank attribute irrespective of CO_CREATE_COA in remote preferences.

@github-project-automation github-project-automation bot moved this to 📋Back Log in General Tester Board Nov 11, 2025
@Gitesh307 Gitesh307 changed the title Fix: Cloning now correctly copies COA values when default COA creation is enabled; Fix: Cloning now correctly copies COA values when default COA creation is enabled. Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📋Back Log

Development

Successfully merging this pull request may close these issues.

Cloning CO does not create exact copy of record

2 participants