You are not logged in.
Pages: 1
i have created a hook for adding a send to option, but it adds to scheduling options also in spite of configuring it not to, as the documentation says:
supportsScheduling: { -> return false }
i use this sento option
sendTo : { compiledReport, report, format, values, execConfig ->
other problem it produce: when you try to modify a current schedule, it gives an error.
regards
Last edited by unsi_2 (2020-12-04 16:29:24)
Offline
any update on this please? can you confirm it is a bug?
thanks
Offline
Hi unsi_2,
can you please modify a minimal script that reproduces this issue ? Please delete everything unnecessary, so that the result is a minimal working example. It doesn't have to export anything, it just has to show the error you mention.
Regards,
Eduardo
Offline
it would be something like:
import net.datenwerke.rs.core.service.sendto.hooks.SendToTargetProviderHook
import net.datenwerke.rs.core.service.sendto.hooks.adapter.SendToTargetProviderHookAdapter
import net.datenwerke.rs.core.client.sendto.SendToClientConfig
import net.datenwerke.rs.utils.zip.ZipUtilsService
import net.datenwerke.security.service.authenticator.AuthenticatorService
import net.datenwerke.rs.core.service.mail.MailService
def HOOK_NAME = "TEST_ZIP_SENDTO"
mailService = GLOBALS.getInstance(MailService.class)
def callback = [
consumes : { report ->
def config = new SendToClientConfig();
config.setTitle("Send zipped via email");
config.setIcon("file-archive-o");
config.setSelectFormat(true);
def user = GLOBALS.getRsService(AuthenticatorService.class).getCurrentUser();
config.setForm("""
{
"width": 600,
"height": 300,
"form" : {
"labelAlign": "left",
"fields": [{
"id": "email",
"type": "string",
"label": "Email",
"value":"""+"\""+ user.getEmail()+"\""+"""
}]
}
}
""")
return config;
},
getId : { ->
return "whatever"
},
//sendTo : { report, values, execConfig ->
sendTo : { compiledReport, report, format, values, execConfig ->
//....
return "Sent the zipped report via email."
},
supportsScheduling: { -> return false }
] as SendToTargetProviderHookAdapter
GLOBALS.services.callbackRegistry.attachHook(HOOK_NAME, SendToTargetProviderHook.class, callback)
Last edited by unsi_2 (2020-12-10 17:53:53)
Offline
the 2 problems seem to be:
- the new hook appears available in scheduling although it shouldn't supportsScheduling: { -> return false }
- when you modify a schedule, the second window appears blank when there is a send to hook with a form
please, verify when you can
thanks in advance
Offline
Hi unsi_2,
we will look into these issues in these tickets:
RS-4545 and RS-4546
I will write here when we have more information.
Regards,
Eduardo
Offline
Pages: 1