quartz-mongodb
quartz-mongodb copied to clipboard
scheduler.rescheduleJob() when used with quartz-mongodb does not allow jobDap map to be updated
The implementation in MongoDBJobStore.replaceTrigger() copies over the jobData map from the old trigger, so it doesn't honor new jobData.
There is already a mechanism in place if users of quartz scheduler want to copy over the previous jobData and that's by using oldTrigger.getTriggerBuilder() to clone the previous trigger data and replace only what needs to be updated.
MongoDBJobStore (more specifically TriggerAndJobPersister) should not try to go beyond the documented behavior - https://www.quartz-scheduler.org/api/2.3.0/org/quartz/Scheduler.html#rescheduleJob-org.quartz.TriggerKey-org.quartz.Trigger-)
Feel free to submit a PR that does the right thing, please include a test or two.