Plugin Information |
---|
View Git Parameter on the plugin site for more information. |
Adds ability to choose branches, tags or revisions from git repository configured in project.
Plugin Info
This plugin allows you to assign git branch, tag, pull request or revision number as parameter in your builds.
Important!
There is no need to set up anything special in plugin settings.
This plugin will read GIT SCM configuration from your projects.
This plugin used directly the Git Plugin and Git Client Plugin.
Basic configuration
Project configuration
Build with Parameters form
Example pipeline script
Important! version 0.9.4 or later
Branch type - Basic usage
// Using git without checkout pipeline { agent any parameters { gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH' } stages { stage('Example') { steps { git branch: "${params.BRANCH}", url: 'https://github.com/jenkinsci/git-parameter-plugin.git' } } } }
properties([ parameters([ gitParameter(branch: '', branchFilter: 'origin/(.*)', defaultValue: 'master', description: '', name: 'BRANCH', quickFilterEnabled: false, selectedValue: 'NONE', sortMode: 'NONE', tagFilter: '*', type: 'PT_BRANCH') ]) ]) node { git branch: "${params.BRANCH}", url: 'https://github.com/jenkinsci/git-parameter-plugin.git' }
Important settings:
- It should be set a default value because initial build must get this information
- Using git should be set a branchFilter as 'origin/(.*)' (origin is a remote server name)
Parameter type
- PT_TAG
- PT_BRANCH
- PT_BRANCH_TAG
- PT_REVISION
- PT_PULL_REQUEST
Important: If you need use other type (other then branch) parameter, you must use git within checkout
Tag type
// Using git within checkout pipeline { agent any parameters { gitParameter name: 'TAG', type: 'PT_TAG', defaultValue: 'master' } stages { stage('Example') { steps { checkout([$class: 'GitSCM', branches: [[name: "${params.TAG}"]], doGenerateSubmoduleConfigurations: false, extensions: [], gitTool: 'Default', submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/jenkinsci/git-parameter-plugin.git']] ]) } } } }
Branch Tag type
pipeline { agent any parameters { gitParameter name: 'BRANCH_TAG', type: 'PT_BRANCH_TAG', defaultValue: 'master' } stages { stage('Example') { steps { checkout([$class: 'GitSCM', branches: [[name: "${params.BRANCH_TAG}"]], doGenerateSubmoduleConfigurations: false, extensions: [], gitTool: 'Default', submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/jenkinsci/git-parameter-plugin.git']] ]) } } } }
Revision type
pipeline { agent any parameters { gitParameter name: 'REVISION', type: 'PT_REVISION', defaultValue: 'master' } stages { stage('Example') { steps { checkout([$class: 'GitSCM', branches: [[name: "${params.REVISION}"]], doGenerateSubmoduleConfigurations: false, extensions: [], gitTool: 'Default', submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/jenkinsci/git-parameter-plugin.git']] ]) } } } }
Pull Requst type
pipeline { agent any parameters { gitParameter name: 'PULL_REQUESTS', type: 'PT_PULL_REQUEST', defaultValue: '1', sortMode: 'DESCENDING_SMART' } stages { stage('Example') { steps { checkout([$class: 'GitSCM', branches: [[name: "pr/${params.PULL_REQUESTS}/head"]], doGenerateSubmoduleConfigurations: false, extensions: [], gitTool: 'Default', submoduleCfg: [], userRemoteConfigs: [[refspec: '+refs/pull/*:refs/remotes/origin/pr/*', url: 'https://github.com/jenkinsci/git-parameter-plugin.git']]]) } } } }
Options:
Parameter Type
type: 'PT_TAG' or 'PT_BRANCH' or 'PT_BRANCH_TAG' or 'PT_REVISION' or 'PT_PULL_REQUEST'
Explains about PT_TAG or PT_BRANCH or PT_BRANCH_TAG:
Plugin using git ls-remote command to get remote tags or branches, this solution was implemented in - JENKINS-40232Getting issue details... STATUS . This has been done for performance reasons. The plugin does not have to featch the repository before getting information
In code plugin useing getRemoteReferences from GitClient, look implementation in CliGitAPIImpl
package org.jenkinsci.plugins.gitclient //... public interface GitClient { //... Map<String, ObjectId> getRemoteReferences(String remoteRepoUrl, String pattern, boolean headsOnly, boolean tagsOnly) throws GitException, InterruptedException; //... }
Branch
branch
Branch Filter
branchFilter
Tag Filter
tagFilter
Sort Mode
sortMode: 'NONE' or 'ASCENDING_SMART' or 'DESCENDING_SMART' or 'ASCENDING' or 'DESCENDING'
You can select the following sorting options for tags/revision/branches/branches_or_tags/pull requests
- none
- descending
- ascending
- ascending smart
- descending smart
For the smart variants the compare treats a sequence of digits as a single character. Contributed by Graeme Hill.
Default Value
defaultValue
In release 0.9.9 or later good to set a default value, because this value is using in the initial build (in Pipeline).
Default value is returned when some error occurred on getting data.
Selected Value
selectedValue: 'NONE' or 'TOP' or 'DEFAULT'
Use repository
useRepository
Remember: You don't set a git repository into the plugin, this plugin using git repositories which are defined in project in SCM section!
If in the task are defined multiple repositories, this option specifies which the repository is taken into account on getting data.
If the option is not defined, is taken a first defined repository.
This option is a regular expression, which is compared to the 'Repository URL'.
You can define the multiple SCM for few way, you can use Multiple SCMs Plugin, specified many 'Repository URL' in one SCM or define them in pipeline.
Consider an example based on two repositories:
pipeline { agent any parameters { gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_A', type: 'PT_BRANCH', useRepository: '.*exampleA.git' gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_B', type: 'PT_BRANCH', useRepository: '.*exampleB.git' } stages { stage('Example') { steps { git branch: "${params.BRANCH_A}", url: 'https://github.com/klimas7/exampleA.git' git branch: "${params.BRANCH_B}", url: 'https://github.com/klimas7/exampleB.git' } } } }
After initial run you get
Example when 'Use repository' is not set:
pipeline { agent any parameters { gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH' } stages { stage('Example') { steps { git url: 'https://github.com/klimas7/exampleA.git' git url: 'https://github.com/klimas7/exampleB.git' } } } }
After initial run you get
Quick Filter
quickFilterEnabled
List Size
listSize
Global configuration
Release 0.9.9 or later
Error handling
Release 0.9.9 or later
If an error occurred while retrieving data, the default value is returned.
Additional information is provided below, along with the cause of the error.
Examples:
This error will occurred when repository is not configured or 'Use repository' option no match with any repository.
This error will occurred when repository not exists or URL is wrong.
This error will occurred when is no ssh command on Jenkins master.
Releases schedule
?
Changelog
16/02/2019 Version 0.9.9
- JENKINS-55769: Tag match filter shows more entries than direct command (git tag -l "$tagFilter")
- JENKINS-55770: Intrusive and misleading warning text from the parameter selection display
- JENKINS-54359: Change error handling
09/10/2018 Version 0.9.6
- JENKINS-53911: Duplicate entries in list, if git repo is checked out twice.
- JENKINS-52533: Display commit message on the build action
- JENKINS-45925: Show git commit message when building with parameter "revision"
17/09/2018 Version 0.9.5
- JENKINS-51041, JENKINS-50510, JENKINS-45419: Fixed use repository option
16/08/2018 Version 0.9.4
- JENKINS-52273: Support git-parameter-plugin in declarative pipeline
- JENKINS-52132: Description with HTML support
20/06/2018 Version 0.9.3
- JENKINS-51521: Git parameter does not show branch list in case deleteDir() is present in pipeline
- JENKINS-51476: Git parameter plugin is not retrieving revision number
16/04/2018 Version 0.9.2
- JENKINS-50776: Default selected item doesn’t always honor exactly Default Value
- JENKINS-49727: Add optional parameter to specify the number of items the list will display
18/02/2018 Version 0.9.1
- JENKINS-45419: 'Use Repository' setting does not find other remote urls if multiple repos are added to job
- PR #55: Add complete French support
02/11/2017 Version 0.9.0
- JENKINS-47110: Retrieving Git references do not work with variable in Repository URL
- PR #54: Help improvement: complete English translation, and reorder items
- JENKINS-47078: IndexOutOfBoundsException for pipeline job
- JENKINS-39530: Add support to Pipeline projects
04/09/2017 Version 0.8.1
- JENKINS-46216: Null Pointer exception when no default parameter provided
- JENKINS-45577: [Git Parameter Plugin] Parameter does not support the definition from CLI
- JENKINS-46624: fix remote name
- JENKINS-46185: Set browser focus to filter after the QuickFilter has been filled
- JENKINS-46038: Extend list of supported type with pull request
- JENKINS-26799: Multiple SCMs plugin support part 3 (Work fine when selected revisions)
- JENKINS-42313: Default Value not honoured
02/06/2017 Version 0.8.0
- JENKINS-26799: Multiple SCMs plugin support part 2
- JENKINS-40523: Include Jenkins Project Name in Log message
- JENKINS-40232: Git Parameter Plugin doesn't need to clone
23/01/2017 Version 0.7.2
- JENKINS-41091: git-parameter:0.7.1 breaks the multi-line parameters in rebuild
11/27/2016 Version 0.7.1
- JENKINS-39366: Add support for a rebuild-plugin
- JENKINS-26799: Multiple SCMs plugin support
09/12/2016 Version 0.7.0
- JENKINS-37555: Better support for internationalization
- JENKINS-37595: Add support for polish localization
- JENKINS-37370: Retrieving Git references do not work with variable in "Repository URL"
- JENKINS-37953: Add support to ProxySCM
- JENKINS-37738: Update dependency in plugin and cleanup in pom
- JENKINS-34876: Git Parameters not working for Pipeline projects and Jenkinsfile from SCM
08/06/2016 Version 0.6.2
- JENKINS-36833: Race Condition Populating Multiple Tag Parameters
- JENKINS-36934: No return value passed to the url
- JENKINS-31939: The top value is better to be chosen by default of to have such option (part 3)
07/19/2016 Version 0.6.1
- JENKINS-31939: The top value is better to be chosen by default of to have such option (part 2)
07/06/2016 Version 0.6.0
- JENKINS-36104: Add Repo SCM support (Derron Hu)
- JENKINS-16290: git parameter plugin doesn't support Jenkins slave setup with git repos checked out only on slaves
- JENKINS-35363: Git parameter filter doesn't work
05/03/2016 Version 0.5.1
- JENKINS-34425: Git parameter plugin skips one build number while populating tags
- JENKINS-34544: NPE After update to 0.5.0
- JENKINS-34574: After cleaned workspace doesn't show branches
04/02/2016 Version 0.5.0
1. User interface
- JENKINS-27435: Quick branch filter (Thank Bruno P. Kinoshita for inspiration)
- JENKINS-33963: Branch filter does not save the value (part of the work Joe Hansche)
2. Refactor/fix/feature
- JENKINS-33361: Long release number in branch, tag or revision name
- JENKINS-33084: Git Parameter plugin should prune stale remote branches (@darashenka)
- JENKINS-31939: The top value is better to be chosed by default of to have such option
- JENKINS-33831: Revision Parameter Type: ArrayIndexOutOfBoundsException
- JENKINS-33912: Refactoring Test Case
01/16/2015 Version 0.4.0
- Possibility to select branch, tag or branch (Alban Dericbourg)
- Keep complex logics in jelly as less as possible (Yestin Sun)
- support folders (Nicolas De Loof)
- Minimized pom.xml as suggested by Jesse Glick
- Removed LICENSE.txt as suggested by Jesse Glick
05/14/14 Version 0.3.2
User visible changes are:
- Updated help texts for configuration and when selecting your tag/revision
- Runs a fetch each time the user enters the "Build with parameter".
- Run clone when fetch fails on workspace empty (Gabor Liptak)
- Merging SortMode from graeme-hill
- With an empty workspace the tags are calculated after we made a checkout. This may take a long time.
Changes relevant to developer
- Added MIT-LICENSE.txt to use the same license as Jenkins-CI.
- Added Contributors.textile
- Display month not minutes in date. Add HH.mm. Display only first 8 chars of SHA1 (Niklaus Giger)
- Add backup pluginRepository (Gabor Liptak)
- Use GitTool to query configured location of the git executable (gliptak)
- Upgrade to git 2.2.0. (christ66)
- Build against latest stable Jenkins-CI version 1.554.1
- New co-maintainer/developer Niklaus Giger (id ngiger)
- Version 0.3 and 0.3.1 never made it to the distribution, because of problems with the release mechanism.
02/21/12 Version 0.2
- Corrected error - plugin wasn't showing anything after change of main Git Plugin
- Corrected major dis-functionality - plugin now it showing revisions only from correct job/project.
- Adding support for choosing branch from which revisions/tags are returned
11/01/11 Version 0.1
- Initial Release
Adds ability to choose branches, tags or revisions from git repositories configured in project.
41 Comments
fcamblor -
Hi !
Thanks to provide this feature ! I need it for a few monthes
Some concerns I have with the actual version of the plugin :
Thanks for the work though
Pawel Ratajczak
Hi,
I can't make this plugin to read new tag from original repository, what I'm getting is list of tags or SHA-1 hashes from previously cloned repository in Jenkis workspace.
This is pretty useless because most often I need to choose most recent tag before cloning that repository to the workspace to be able to process this most recent in build steps.
Could you please tell me how to get list of current tags from the original repository not old workspace clone?
Besides it somehow cashes the results and after adding new tags I need to go to job configuration to switch from tag to revision, make a build, then switch backwards from revision to tag get tag list up to date (I tried that on two different Jenkins instances on different servers)
Unknown User (vladiksip@centrum.cz)
Hi Pawel,
I've got the same problem as you... could you please tell me how did you solved it?
Thanks in advance,
-Vlada
Pawel Ratajczak
Hi Vlada,
I'm using git post receive hook, this is a script which git runs after push:
tags=`ls /var/git/data.gov.uk.git/refs/tags | sed -n '/.rc/!p' | tr '\n' ','`
echo "TAGS=$tags" > /home/dgu/dgu_git_tags
branches=`git --git-dir /var/git/data.gov.uk.git/ branch | tr -d '*' | tr -d ' ' | tr '\n' ','`
echo "BRANCHES=$branches" > /home/dgu/dgu_git_branches
It creates two files: dgu_git_tags and dgu_git_branches.
These files are used by Extended Choice Parameter plugin with following configuration:
Name: TAG
Property File: /home/dgu/dgu_git_tags
Property Key: TAGS
I hope it helps.
Pawel
Alexander Glue
Thanx for that great comment! it was very helpful!
Matt Jernigan
For anyone interested, I followed Pawel's lead and took it further so that you don't need to add hooks or scripts. Pure Jenkins all the way with a tags and branches list that is always up to date.
I describe how to do it in my blog post here:
Jenkins and Git at Plaid Speed
It uses the Extensible Choice Parameter plugin to launch an inline Groovy script to fetch current tag and branch data directly from a remote Git repo.
Nam Vu
Hi,
Has anyone managed to get this working? When I specify a git parameter and build, the page doesn't respond and hangs.
Thanks
Daniel Kirkdorffer
How do you indicate the repository? I'm seeking to use this as a replacement for the List Subversion Tags parameter as we migrate from SVN to Git.
Thanks,
Dan
Daniel Kirkdorffer
I've added the use of this, asking for a pulldown of tags for a project that has been cloned and fetched, and that has 6 tags, and when the parameter choices are displayed the following is spewed to the logs:
Caused by: hudson.plugins.git.GitException: Command "git.exe fetch -t" returned status code 128:
stdout:
stderr: fatal: Not a git repository (or any of the parent directories): .git
at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:897)
at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:858)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:200)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:204)
at net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition.generateContents(GitParameterDefinition.java:236)
at net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition.getTagMap(GitParameterDefinition.java:299)
... 159 more
I cannot figure out what the issue is. It is as if it isn't able to determine that I have a git workspace.
Zaraki Kenpachi
.
David Williams
How does this plugin set the git directory? Currently I see in the log that it is using D:\Jenkins but that directory doesn't exist and it is not the value of the JENKINS_HOME variable
Thank you,
Scott Engemann
I think this is the right plugin that I'm looking for but I'm not sure how to configure it correctly to accomplish what I want. I'm trying to configure a Jenkins project to build ONLY if my git commit contains a specific tag named (demo). Could anyone assist me on configure this correctly? Thank you in advanced!
Viachaslau Kabak
Hi all,
how to set the default value - the most top value from the list?
Unknown User (ckutz)
Has anyone figured out what the 'branch' and 'tag filter' options are working?
I would like to list only all 'release/*' branches, but neither branch nor tag filter doesn't seem to have any effect!?
Richa Gautam
Its fixed by Boguslaw Klimas and was supposed to release by 04/02/16. Any updates on this ?? when will it be released?
Sorin Sbarnea
It would be really useful if this plugin will allow us to specify the repository source for getting the branches or releases as these are usually not the ones from the same repository where we keep our build scripts.
Justin Hyland
How do I have Jenkins checkout the selected revision? I was able to get the branch option working by naming the parameter named Branch, then for the jobs Branches To Build setting, I just referenced the environmental variable Branch.
But I don't see where I can do that for the revision?
Thanks
Sergey Kadnikov
Can anybody please help me with plugin configuration for multiple repository project?
I have following issue using plugin.
I have an Ansible deployment scenario managed by Jenkins. All Ansible scripts are located in repository https://<some host>/sops.git
Ansible scripts deploy a war to application server. Source code for war file is located in repository https://<some host>/platform.git.
To deploy necessary war file I need to enter GIT revision that is included into war build number.
I'm trying to use Git parameter plugin.
What do I need to do to get things done and have my repository https://<some host>/platform.git revisions list in parameter field?
I'm using plugin version 0.8.0 with Jenkins 1.652
KR, Sergey
Mark Waite
You'll get far better results from asking that type of question on the Jenkins users mailing list, rather than as a question on a wiki page.
Nicola Beltrami
I've problem to set a Tag Filter.
I need to get last tag of origin/master branch
On plugin i've insered this value:
--points-at origin/master
The complete git instruction should be:
git tag -l --points-at origin/master
This command on terminal works correctly, but on plugin i don't see nothing
Do you have any Idea?
Note:
Richard Flint
Could someone provide me with an example of how to use this plugin within a Jenkinsfile please.
Stewart Bryson
First... update to the latest version. 0.9.4 came out in the last day or so and is a requirement. Then you can do something like the following:
This will at
Second... it doesn't work with the Blue Ocean UI when doing an Input Stage or Step. I get this error:
When I click Resolve Input, then I get the following:
apgray Gray
This works for branches. How can I get a list of tags on a branch?
Stewart Bryson
It's the type option I believe.
apgray Gray
Can you provide an example?
The below doesn't work
Derek Gibson
Me too please, I cannot find any documentation on it anywhere
apgray Gray
Documentation here but it is for branches in a repository rather than tags in a branch.
Jason Tsai
backgound information:
so,
Christophe Gouiran
Issue 2 should be fixed by JENKINS-50776 - Getting issue details... STATUS .
Subhajit Dutta
Hi
I have noticed that git plugin is checking out old and stale branches but not the latest . I am passing below parameters
Repository URL:git@github.XXXXXXXX:XXXX/XXXXX.git
Branch Specifier (blank for 'any') ::^(?!origin/master$).*
Mark Waite
You might check if a branch named "
origin/master
" is defined in the working directory of the agent performing the checkout. That would create an ambiguity because the regular expression would match both the local branch "origin/master
" and the remote branch "origin/master
".One way to avoid that problem is to use a more specific name for the remote reference, such as "
refs/heads/master"
or "refs/remotes/origin/master". Refer to the git plugin help for the "Branch Specifier" for more details of alternate ways to specify the branch name.
jai kunwar
I am using above configuration, in this case It shoud filter all the tags created in Lab2_Release branch. But it is fetching all tags form other branches as well. So could you plesae suggest whats wrong?
Ed Randall
Hi, thanks for this, but please complete the documentation with some clear and concise examples for pipeline users.
You mention Quick Filter up there but just the heading - what's the attribute name? How about a table listing all the option attribute names and values?
I tried guessing 'quickFilter' but just got an error. Much digging through code reveals the option name is '
quickFilterEnabled
'.Albert Stein
Is there any way to make this work with scripted pipeline rather than declarative, or any plan to add support for that if currently not possible?
Boguslaw Klimas
Hi,
I added example
Arnd S.
When selecting "branch or tag" as parameter type how can i later in my pipeline differentiate between those two type to checkout the select branch or the select tag (which needs to be treated differently as described above in the description)
Vitaly Karasik
Played with this plugin in Declarative Pipeline job, works nice with one issue - list of tags is not updated based on the current run, but on the previous one. Is there any solution for that?
Katone Vi
For those who are using "Pipeline Script" (which is part of Jenkins Pipeline Project), you cannot define your repos in the GUI.
You can, however (just like it is explained above in this documentation), define these repos in your Jenkinsfile (e.g. Pipeline Script).
This is how to do it. I suggest making a brand new project to build understanding first before implementing to your main pipeline:
Paste the following contents in (in this example we are fetching the branch name that is passed by the user on Jenkins "Build with Parameters"):
// Replace these URL to your target projects
def project1 = "https://github.com/klimas7/exampleA.git" // you can use the scp url here as well. Doesn't matter"
def project2 = "https://github.com/klimas7/exampleB.git" // you can use the scp url here as well. Doesn't matter"
pipeline {
agent any
parameters {
gitParameter branchFilter:
'origin.*/(.*)'
, defaultValue:
'master'
, name:
'MY_BRANCH_A'
, type:
'PT_BRANCH'
, useRepository: "${project1}"
gitParameter branchFilter:
'origin.*/(.*)'
, defaultValue:
'master'
, name:
'MY_BRANCH_B'
, type:
'PT_BRANCH'
, useRepository: "${project2}"
}
stages {
stage(
'Example'
) {
steps {
git branch:
"${params.MY_BRANCH_A}"
, url: "${project1}"
git branch:
"${params.MY_BRANCH_B}"
, url: "${project2}"
}
}
}
}
Please do NOT remove the "origin" or the "defaultValue" or anything from this sample! We need a default branch to run successfuly at least once in order for this to work!
You should now be able to see the branches
Question: I changed the URL inside the Jenkinsfile... but now the dropdown boxes aren't showing me the correct values. What is going on?
Answer: If you plan to update the URL, you must go inside the "Configuration" of the project, then uncheck the "This project is parameterized" (or whatever it says) checkbox.
Once you uncheck it, click the "save" button.
The "Build with Parameters" button should now reset to "Build". Click the "Build" button to update the parameters dropdown boxes values
Question: Do we have to rebuild each time in order to keep the dropdown boxes up-to-date with our latest branches?
Answer: No, you do not. It will automatically be up-to-date... even if you haven't ran the build in weeks
Question: What about credentials? How do I handle credentials for my Jenkinsfile to login to my Git Server?
Answer: You will have to get the credentialsId and append that to your code
...
stages {
stage(
'Example'
) {
steps {
git branch:
"${params.MY_BRANCH_A}"
, url: "${project1}" credentialsId:
'12345-1234-4696-af25-123455'...
In order to get the credentialsId:
Select the type of repo you are handling... then click "Generate" button
Providing steps here for those who are struggling like I did all day. Good luck.
Boguslaw Klimas
Thanks you very much for a very useful description!
Katone Vi
Suggestion:
Is it possible to connect this plugin with the "Choice Parameter"?
So if I choose a branch-name of the choice parameter, this plugin will load the git-app from the "Choice Parameter", refreshing itself?
Would be awesome. This would be used for those who are looking for a "One-Jenkinsfile-pipeline" that allows the acceptance-tester to switch off the head at any time.
Just a suggestion!
Boguslaw Klimas
Hi,
Unfortunately no because build parameters are independent of each other (after load on UI).
I known one example when this is not a true: Active choices parameter - in this plugin you can define reference parameter (within this plugin). In this particular example this is a custom solution.