[SERVER-28750] Add option to $currentDate to update field only if a update of other fields really occured Created: 12/Apr/17 Updated: 26/Apr/19 Resolved: 18/Apr/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Henri-Maxime Ducoulombier | Assignee: | Mark Agarunov |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Hello, I don't know if it's possible because I don't know the mechanics inside the update process well enough, but I thought this would be interesting to extend the $currentDate operator to update the date if and only if (optionnaly) at least 1 other fields in document was updated. As an example, imagine I have a document :
And this update request :
Appart from the $currentDate, this update does not actually update anything in the document. And I thought this would be useful to have $currentDate update the "du" fields only if firstname had changed. Maybe there is a design pattern to do that another way, but in my application, I have to do a lot of bulk updates and sometimes, with data that has already been written and thus, updates doing nothing... Thanks for any input on the matter. |
| Comments |
| Comment by Ian Whalen (Inactive) [ 26/Apr/19 ] |
|
Switching "Drivers Changes Needed" from "Maybe" to "Not Needed" since this was closed as something other than Fixed. |
| Comment by Mark Agarunov [ 18/Apr/17 ] |
|
Hello hmducoulombier@marketing1by1.com, Thank you for the report. Looking over the behavior you're describing, this appears to be the same behavior requested in Thanks, |