Volunteers-for-Salesforce
Volunteers-for-Salesforce copied to clipboard
Extending JRS causes Completed VRS Hours to be changed
hub post with reproducible steps: https://powerofus.force.com/0D58000003PtljE
basically, the contact has completed VRS hours in the future. when the JRS gets changed, the VRS future hours maintain their status, but have number of volunteers and hours updated to what the JRS originally had. We should leave all fields alone on Hours that are marked Completed.
**lurch: add
Tracking W-018815
OK, so this isn't a bug rather than a spec issue. here is the article of how it is supposed to work: https://powerofus.force.com/articles/Resource/V4S-Recurrence-Schedule-Processing
In the Volunteer Recurrence Schedule section of the article, the last bullet says, under "When a VRS is modified, the system:" says:
"Updates the following fields on future Volunteer Hours that still match the VRS and a Shift (to match the updated VRS values): Hours Worked, Number of Volunteers, Planned Start Date and Time, and Comments. Note that Status, and any custom fields, are not updated. "
I spec'ed it this way, thinking the user was modifying the VRS, and would expect future hours to reflect changes made to the VRS. But I think you raise a good point. If you've already marked the Hours as Completed, even though they are in the future, you probably don't want us to change anything on the Hours.
@mpusto I think this is a spec change worth considering. what do you think? Can we say if the Hours are marked Completed or Canceled, we just leave them alone? it will be too complicated to figure out when the change is being instigated by the VRS being modified, vs the JRS being modified (that has us re-evaluate all the VRS's).
customer also claims past hours are also changed. i haven't tried to reproduce that, but am pretty sure the code leaves past completed and canceled hours alone. will need to investigate further.
I just tested, and I could not get past completed or canceled hours to get changed. ie, they seem to be correctly left alone. the issue/spec change is only pertinent to future hours. past hours are ok.
@davidhabib I agree--if something is completed or canceled, leave it alone.
I was unable to get past hours to change as well which is why I asked her for her repo steps.