Truncating status labels in custom script field

Hi.

 

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

I changed the class to this:

class=\"aui-label\">

 

then it doesn't truncate the label.

0 vote

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

172 views 0 4
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