How to hide the Status field?

Ben Geng July 6, 2011

I created a custom issue type, and I don't want the Status field show up on the viewing page, but I can't seem to find a way to hide it (the Status does not showup on the field configuration page).

thanks in advance for your comment/help.

-Ben

5 answers

1 accepted

1 vote
Answer accepted
justindowning
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.
July 6, 2011

Edit this file: atlassian-jira/WEB-INF/classes/templates/jira/issue/summary/issuesummaryblock.vm

Around line 16, you can comment or remove this block:

            <li class="item item-right">
                <div class="wrap">
                    <strong class="name">$i18n.getText("issue.field.status"):</strong>
                    <span id="status-val" class="property-list-value">
                        #set ($status = $issue.getStatusObject())
                        #displayConstantIcon($status) $textutils.htmlEncode($status.nameTranslation, false)
                    </span>
                </div>
            </li>

You will need to restart JIRA, unless you have modified your velocity.properties file as directed here.

Ben Geng July 6, 2011

Justin,

thanks for the tips, I did not know this file before.

Tthe problem though is that it removes Status from all screen. I am looking for a way to hide the Status on my custom screen only.

justindowning
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.
July 6, 2011

No problem. You'll want to wrap the status div with some velocity that checks what Screen is being used to display the issue details.

Ben Geng July 7, 2011

Totally no idea how to do that. can you point to a place that i can find some documentation/samples?

thanks.

Dave Yu [YP] July 7, 2011

Along the lines of what Justin suggests, you could wrap that <li /> element in a conditional statement like this:

#if ($issue.getIssueTypeObject().getName() != "My Issue Type" )
    <li class="item item-right">
    ...
    </li>
#end
Ben Geng July 8, 2011

Dave,

thanks a lot, that worked fine for me.

0 votes
Nic Brough -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.
July 7, 2011

Ah, that's not going to work - Status isn't even a field - it's an integral part of the workflow. You can't use another field for it and you can't remove it. You can rename it, play with the colours and icons, and use whatever values you need, but you can't get rid of it. If you use the velocity given in the other answers to supress it on issue-view, you'll still find it in all sorts of other places, and you'll find you miss it almost immediately.

0 votes
Ben Geng July 6, 2011

good question! I wanted to setup a workflow based on my custom field, not Status.

0 votes
Nic Brough -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.
July 6, 2011

I assume that your issue type doesn't have a workflow?

0 votes
João Junior July 6, 2011

The status field, as well as some date fields, can not fail to be displayed on the default screen display issues.

One option would be to create a plugin that displays the information as you need or customize the file .vm.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events