Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to hide released versions of a project in a Single Version Picker custom field?

Ryan Grimard January 18, 2012

When editing the custom field, I see "Version options:All versions available for the project of the issue". How are these options set? I can't find the documentation on this.

4 answers

1 accepted

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 2, 2012

You might want to create a new custom field type. It is not possible out of the box in JIRA.

You can also modify the template for version picker and restart JIRA. Remove the following from edit-version.vm under WEB-INF/classes/templates/plugins/fields/edit:

        #if ($releasedVersion && !$releasedVersion.empty)
            <optgroup label="$i18n.getText('common.filters.releasedversions')">
                #foreach ($option in $releasedVersion)
                    <option#if ($selectedValues && $selectedValues.contains($option.id.toString())) selected="selected"#end value="$option.id">
                        $textutils.htmlEncode($option.name)
                    </option>
                #end
            </optgroup>
        #end

Remember, if you do this, you will have to do this for every JIRA upgrade!

1 vote
Bhushan Nagaraj
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 20, 2012

Can released versions be hidden only for "Fix Versions"? We do not want users to select a fix for a version that has already been released.

0 votes
Ryan Grimard February 2, 2012

Anyone else?

Bhushan Nagaraj
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 24, 2012

If its a version picker custom field, and you would like to hide released versions for a single field, try this

1. Edit the file in WEB-INF\classes\templates\plugins\fields\edit\edit-version.vm

Replace

#if ($releasedVersion &amp;&amp; !$releasedVersion.empty)
            &lt;optgroup label="$i18n.getText('common.filters.releasedversions')"&gt;
                #foreach ($option in $releasedVersion)
                    &lt;option#if ($selectedValues &amp;&amp; $selectedValues.contains($option.id.toString())) selected="selected"#end value="$option.id"&gt;
                        $textutils.htmlEncode($option.name)
                    &lt;/option&gt;
                #end
            &lt;/optgroup&gt;
#end

with

#if($customField.id != '&lt;YOUR CUSTOM FIELD ID&gt;')
        #if ($releasedVersion &amp;&amp; !$releasedVersion.empty)
            &lt;optgroup label="$i18n.getText('common.filters.releasedversions')"&gt;
                #foreach ($option in $releasedVersion)
                    &lt;option#if ($selectedValues &amp;&amp; $selectedValues.contains($option.id.toString())) selected="selected"#end value="$option.id"&gt;
                        $textutils.htmlEncode($option.name)
                    &lt;/option&gt;
                #end
            &lt;/optgroup&gt;
        #end
#end

I am still trying to hide the released versions from the "Fix Versions" system field but unable to do so. Any help would be appreciated.

Cheers

Bhushan

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2012

I guess the archived versions are not shown in version picker fields.

Ryan Grimard January 19, 2012

Agreed, but my requirement was single-pick.

Ryan Grimard January 19, 2012

I have two single version picker custom fields. In one of them I'd like to only show unreleased versions.

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2012

Actually the affects versions and fixversions (the standard fields) exactly serve these purpose.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events