Truncating status labels in custom script field



I have a custom groovy scripted field that I'm calculating a status value based on linked issues. What I'm trying to do it to reuse the JIRA status labels so that it looks nice and familiar to the user.

What I'm returning from the script for the custom field is this:


"<span id=\"status-val\" class=\"value\"><span class=\" jira-issue-status-lozenge aui-lozenge jira-issue-status-lozenge-blue-gray jira-issue-status-lozenge-new jira-issue-status-lozenge-max-width-long \" data-tooltip=\"<span class=&quot;jira-issue-status-tooltip-title&quot;>To Do</span><span class=&quot;jira-issue-status-tooltip-desc&quot;>The issue has been completely defined and estimated. Ready to be worked on.</span>\" title=\"\" " +
"original-title=\"\">To Do</span></span>"


Now this works perfectly exept that it truncates the label name. So it only displays T...

Please see picture.

Truncated label name.png

Does anybody know how to get it to stop truncating the name?

2 answers

1 accepted

0 votes
Accepted answer

I changed the class to this:



then it doesn't truncate the label.

0 votes

I don't think you can, without using another aui class.

Strange that I cannot set the width of the label. That would solve it.

There has to be a way to dispaly status labels in a custom field. Might be that the approach I have tried is the wrong approach and that there is a better one?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

445 views 8 26
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you