For the dynamic providers (Shell, Groovy) it should be possible to get information about the current job.
When triggering a parameterized build job, the System Groovy script, which is executed to collect the choices, should be able to get the name of the current job. With the prefix of the current job we want to find all jobs that have the same prefix and make them available as choices.
The job "prefix-admin-create-branch-job" executes a System Groovy script to collect all jobs with the same "prefix". The user selects one of the jobs to copy a job for a new subversion branch.
I could not find a way how to get the name during the extensible choice provider execution. Later during the build (Ant, Maven, ...), the environment variable "JOB_NAME" is accessible, but it has not been set when the extensible choice parameter plugin is executed.
Jenkins has a longer list of environment variables:
Environment variables could not be used for the System Groovy scripts as the script is not forked into a separate process and thus there is no chance to set the variables. For a shell provider this is possible, as the shell script is forked out into a new process anyway.