iTop icon indicating copy to clipboard operation
iTop copied to clipboard

N°8891 - feat(DBObject): Add CopyIfNull() helper to copy attribute only if target is null

Open favincen opened this issue 2 months ago • 1 comments

Base information

Question Answer
Related to a SourceForge thead / Another PR / Combodo ticket? Combodo's partners documentation
Type of change? Enhancement

Objective (enhancement)

DBObject provides helpers like Set(), SetIfNul(), and Copy(), but misses CopyIfNull(). CopyIfNull() is documented and recommended by Combodo in its partners documentation, and is really useful for its purpose. Documentation states a PR to add this helper would be welcomed, so here it is.

Proposed solution (bug and enhancement)

Add the missing helper method in iTop, as it is documented.

Checklist before requesting a review

  • [x] I have performed a self-review of my code
  • [x] I have tested all changes I made on an iTop instance
  • [ ] I have added a unit test, otherwise I have explained why I couldn't
  • [x] Is the PR clear and detailed enough so anyone can understand digging in the code?

Checklist of things to do before PR is ready to merge

  • [ ] mention this new API method in documentation
  • [ ] update partners documentation to explain how to use instead of how to add, and remove recommandation to make a PR

favincen avatar Oct 30 '25 00:10 favincen