Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Truncating status labels in custom script field

Jo-André Lia August 11, 2017

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

0 votes
Answer accepted
Jo-André Lia November 17, 2017

I changed the class to this:

class=\"aui-label\">

 

then it doesn't truncate the label.

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 14, 2017

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

Jo-André Lia August 17, 2017

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?

Like Yasser R_ likes this
Yasser R_
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 1, 2019

is there anyway to fix this issue in confluence image.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events