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

Accepted Answer
0 votes

I changed the class to this:

class=\"aui-label\">

 

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
Posted Oct 11, 2018 in Marketplace Apps

You + one app + a desert island...

Hi all! My name is Miles and I work on the Marketplace team. We’re looking for better ways to recommend and suggest apps that are truly crowd favorites, so of course we wanted to poll the Community. ...

2,591 views 5 6
Join discussion

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