Thank you very much Alex. Your pointers, combined with Chris's implementation in JENKINS-12421, did the trick. I now have a way to solve this, but I was only able to make it run when I did it as a pre-send script, which means that the script must be duplicated in every job (hundreds).

So, you say it is possible to run this script directly from the Project Recipient List? I've added ${SCRIPT, script="get-claim-recipient.groovy"} to a job's Default Content (for debugging) and it seems to run. But I'm not able to output any text from the script. It does not accept %>sometext<% (unexpected token: <). I've also tried println("Hello"); but nothing is written in the email. logger.println() also does not work (No such property: logger for class).

Also, I'm not able to make mailext/groovy accept "address = user.getProperty(hudson.tasks.Mailer.UserProperty).getAddress();". (No such property: hudson for class). This line works well if it is a pre-send script. I've tried to import hudson.model.User.* as well.

And finally, if I do it like this, then will I be able to provide any default recipients (for non-claimed jobs) in the job configuration? Maybe I should simply wait for JENKINS-14508.

I obviously don't have enough knowledge here, so I apologize for all my novice questions and humbly hope for some more guidelines.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to