Hello,
We were struggling with a real p4 trigger not probing the jobs (while manual one worked perfectly fine).
It came out, that a job's build permission on anonymous user is not enough, as it's handler, P4Hook.doChange, when calls getJobs(), actually returns 0 jobs (tested with custom build of p4.hpi and additional logging). That was weird... but hinted me that maybe context of anonymous user have something to do with it, as manual trigger is able to successfully call getJobs() when user is fully authenticated. Adding Job Read permission on anonymous user at Matrix-based security fixed our issue.
I would like to ask adding additional permission check of type read around here:
https://github.com/jenkinsci/p4-plugin/blob/c421b5497182e11343f26abccdb69948c52e7305/src/main/java/org/jenkinsci/plugins/p4/trigger/P4Hook.java#L79
... unless it should work as it is and issue is somewhere else.
Thanks,
Maciej
Thanks mmatczak - Thanks. I have discussed this with the developers and we will look into it.