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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

182 views 0 5
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