reminder.setOwnerUserKey(anykey) does not have any effect. The current user always owns the created reminder.
Background: I’d like to create a reminder by a workflow-postfunction, that can only be edited or deleted by other postfunctions. So I want the reminder to be owned by some technical user, and not the current user. But setOwnerUserKey does not seem to work.
ouch, this should have gone to project REM. could someone please move the issue?
Unfortunately addReminder method overrides owner user key with current user. I think we should move this overriding operation to Rest API and our service class should assume owner user key is correct. This will ensure no one can create a reminder for another user using Rest API but also allows scripts to override this behavior. But there may be a workaround which doesn't need a new release.
There is another method:
This method is private and doesn't exist on ReminderService but it exist on ReminderServiceImp class. Since Groovy doesn't care whether a method is private or not, you should able to call this method. Please let me know if you need more information.
You may also want to check whether assignee is null and skip creation of reminder if assignee is null.
perfect! It works!
Thanks a lot!
I'm glad it is working.