Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-26746

Transition button unable to display more than 25 characters of transition name.

    • Icon: Suggestion Suggestion
    • Resolution: Won't Fix
    • None
    • None
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      From the following screenshot, transition buttons have limitation of displaying long name.


      For some users who need to display long transition name, the limitation of length is insufficient to display the essential name.

        1. css.png
          css.png
          5 kB
        2. css2.png
          css2.png
          4 kB
        3. screenshot.207.jpg
          screenshot.207.jpg
          43 kB
        4. screenshot.208.jpg
          screenshot.208.jpg
          56 kB

            [JRASERVER-26746] Transition button unable to display more than 25 characters of transition name.

            Sylvain Leduc added a comment - - edited

            I used the mentioned piece of code in the banneer (Jira 8.13)

            <style type="text/css">
            #opsbar-transitions_more_drop

            { min-width: 300px !important; max-width: 300px !important; }

            </style>

            it worked - workflow steps bar is way wider - but text is still truncated

             

            Sylvain Leduc added a comment - - edited I used the mentioned piece of code in the banneer (Jira 8.13) <style type="text/css"> #opsbar-transitions_more_drop { min-width: 300px !important; max-width: 300px !important; } </style> it worked - workflow steps bar is way wider - but text is still truncated  

            Neha Kapoor (Inactive) added a comment - https://getsupport.atlassian.com/browse/GHS-105247

            We want to update to Version 6.4.5
            In ...\atlassian-jira\includes\decorators\aui-layout\head-resources.jsp I don't find code like

            <style type="text/css">
            #opsbar-transitions_more_drop

            { min-width: 300px !important; max-width: 300px !important; }

            </style>

            Has this code moved to another file?

            Heinrich Karn added a comment - We want to update to Version 6.4.5 In ...\atlassian-jira\includes\decorators\aui-layout\head-resources.jsp I don't find code like <style type="text/css"> #opsbar-transitions_more_drop { min-width: 300px !important; max-width: 300px !important; } </style> Has this code moved to another file?

            Hi Bhushan,

            that didn't help, only the transition buttons got wider

            but changing the id helped

            <style type="text/css">
            #opsbar-transitions_more_drop

            { min-width: 300px !important; max-width: 300px !important; }

            </style>

            Peter von Hofer added a comment - Hi Bhushan, that didn't help, only the transition buttons got wider but changing the id helped <style type="text/css"> #opsbar-transitions_more_drop { min-width: 300px !important; max-width: 300px !important; } </style>

            Hey Peter,

            Paste this in your announcement banner


            <style type="text/css">
            .issueaction-workflow-transition
            { min-width: 400px !important; max-width: 400px !important; }
            </style>

            Bhushan Nagaraj added a comment - Hey Peter, Paste this in your announcement banner <style type="text/css"> .issueaction-workflow-transition { min-width: 400px !important; max-width: 400px !important; } </style>

            Do you have any tips for JIRA 5.2.7?
            Since modifing IssueOperationsBarUtil.java doesn't work anymore.
            It seems like the width of the drop down (200px) is hard coded in java script somewhere

            Peter von Hofer added a comment - Do you have any tips for JIRA 5.2.7? Since modifing IssueOperationsBarUtil.java doesn't work anymore. It seems like the width of the drop down (200px) is hard coded in java script somewhere

            Thanks for the feedback and the suggestion - for many UI Elements in JIRA, letting text or labels go unbounded creates a much more complex UI and problems in different displays, so we enforce displaying certain sizes like we do in this case.

            If this is a critical issue for your organization, there are the solutions suggested in the comments, though they do require modifications to JIRA source which are not guaranteed to work with future versions of JIRA.

            Cheers,

            JIRA Product Management

            Bryan Rollins added a comment - Thanks for the feedback and the suggestion - for many UI Elements in JIRA, letting text or labels go unbounded creates a much more complex UI and problems in different displays, so we enforce displaying certain sizes like we do in this case. If this is a critical issue for your organization, there are the solutions suggested in the comments, though they do require modifications to JIRA source which are not guaranteed to work with future versions of JIRA. Cheers, JIRA Product Management

            This can be done by customizing your JIRA source code so that the menus can display more than 25 characters. You can download the source code from the following link:

            Once you have downloaded the source code, locate the file IssueOperationsBarUtil.java which is located on the following directory

            atlassian-jira-4.4.4-source\jira-project\jira-components\jira-core\src\main\java\com\atlassian\jira\issue\util
            

            Within that file, locate the following lines:

                /**
                 * Get a display label for a link
                 * Shows a maximum of 25 characters.
                 *
                 * @param link the link to get the label for.
                 * @return the links label, abbreviated to 25 chars
                 */
                public String getLabelForLink(SimpleLink link)
                {
                    return StringUtils.abbreviate(link.getLabel(), 25);
                }
            
                /**
                 * Get the title for the link.
                 * If the link label has been abbreviated and there is no set title, use the full label.
                 *
                 * @param link The link to get the title for.
                 * @return The title for the link
                 */
                public String getTitleForLink(SimpleLink link)
                {
                    final String label = link.getLabel();
                    final String title = link.getTitle();
            
                    if (StringUtils.isBlank(title))
                    {
                        if (label.length() > 25)
                        {
                            return label;
                        }
            
                        return "";
                    }
            
                    return title;
            
                }
            
            }
            

            As you can see from the source, the limitations of the label link (getLabelForLink() method) returns a string of 25 characters. Modify the number to your preference (ie. 50) and also modify the string length for title link (getTitleForLink() Method).

            Once you have modified the file, you will need to build JIRA from source to make a JIRA Patch. Please refer to the following documentation for detailed steps:

            Immanuel Siagian (Inactive) added a comment - This can be done by customizing your JIRA source code so that the menus can display more than 25 characters. You can download the source code from the following link: http://www.atlassian.com/software/jira/JIRASourceDownloads.jspa Once you have downloaded the source code, locate the file IssueOperationsBarUtil.java which is located on the following directory atlassian-jira-4.4.4-source\jira-project\jira-components\jira-core\src\main\java\com\atlassian\jira\issue\util Within that file, locate the following lines: /** * Get a display label for a link * Shows a maximum of 25 characters. * * @param link the link to get the label for. * @return the links label, abbreviated to 25 chars */ public String getLabelForLink(SimpleLink link) { return StringUtils.abbreviate(link.getLabel(), 25); } /** * Get the title for the link. * If the link label has been abbreviated and there is no set title, use the full label. * * @param link The link to get the title for. * @return The title for the link */ public String getTitleForLink(SimpleLink link) { final String label = link.getLabel(); final String title = link.getTitle(); if (StringUtils.isBlank(title)) { if (label.length() > 25) { return label; } return ""; } return title; } } As you can see from the source, the limitations of the label link (getLabelForLink() method) returns a string of 25 characters. Modify the number to your preference (ie. 50) and also modify the string length for title link (getTitleForLink() Method). Once you have modified the file, you will need to build JIRA from source to make a JIRA Patch. Please refer to the following documentation for detailed steps: http://confluence.atlassian.com/display/JIRA044/How+to+Make+a+JIRA+Patch

            Solution:

            in file:
            atlassian-jira/includes/panels/issue/viewissue-opsbar.jsp

            on line 41

            original code
            <a class="aui-list-item-link <ww:property value="./styleClass"/> 
            <ww:property value="@group/id"/>" id="<ww:property value="./id"/>" 
            title="<ww:property value="/opsBarUtil/titleForLink(.)"/>" href="<ww:property value="./url"/>">
            <ww:property value="/opsBarUtil/labelForLink(.)"/></a>
            

            replace "labelForLink" with "titleForLink"

            Peter von Hofer added a comment - Solution: in file: atlassian-jira/includes/panels/issue/viewissue-opsbar.jsp on line 41 original code <a class= "aui-list-item-link <ww:property value=" ./styleClass"/> <ww:property value= "@group/id" /> " id=" <ww:property value= "./id" />" title= "<ww:property value=" /opsBarUtil/titleForLink(.) "/>" href= "<ww:property value=" ./url "/>" > <ww:property value= "/opsBarUtil/labelForLink(.)" /></a> replace "labelForLink" with "titleForLink"

              Unassigned Unassigned
              hlteck Teck Hong Loong [Atlassian]
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: