Hi p4karl,
I can repro the issue by triggering a job manually with a specific changelist number provided as a parameter. The workspace map is be being restricted through a virtual stream. The requested changelist contains only files excluded by the virtual stream.
Looking through the code, I believe the issue is in CheckoutTask#getBuildChange(Workspace workspace) which is called by CheckoutTask#initialise().
In my case, the populate label is set to '${Changelist}' which references a String parameter to specify the changelist number to sync. The Expand replaces this token and parses an integer from the String parameter value. This integer is used to create a new P4ChangeRef which is then returned as the build change. I believe this function needs to run a second 'p4 changes -m1 //WORKSPACE/...@${build.getChange()}' to determine the correct build change value for the workspace's view.
If I have time this week, I can put together a PR with a new test case and fix.
Hi stuartrowe. Thanks for highlighting this. I could understand why this happens. The system does a `p4 changes -m1 //WORKSPACE/...` which retrurns the highest changelist synced to the workspace view.
Can you please let me know how the job is being triggered and how the workspace map is being restricted so I can repro this here.