Question concerning ShowStatusInColor

http://wiki.bestpractical.com/index.cgi?ShowStatusInColor

I’ve added the page as to the direction in Show Status In Color and it
works properly to show status’s in color using RT 3.4.2

The problem I have with it is that (pending approval) and (pending other
Collection) show up with the tags around them.

If you view source, the section is displayed as,

<em>(pending approval)</em>

The quoting is different on this overlay than in the original page, but
I’ve tried (haphazardly) to use the previous style of quoting for that
line, and it returns

SCALAR(0xba558b4)(pending other Collection)SCALAR(0xba558f0)

Not knowing what you’re doing is fun.

So I was thinking I could remove the tags entirely, but it seems
useful to have the emphasis there.

Does anyone know the reason why this happens? How I may correct this
issue?

Thank you.

Nathan Oyler wrote:

Request Tracker Wiki

The problem I have with it is that (pending approval) and (pending other
Collection) show up with the tags around them.

So I was thinking I could remove the tags entirely, but it seems
useful to have the emphasis there.

Does anyone know the reason why this happens? How I may correct this
issue?

Nathan,

This works for me:

if ( $Ticket->HasUnresolvedDependencies ) {
    if ( $Ticket->HasUnresolvedDependencies( Type => 'approval' )
         or $Ticket->HasUnresolvedDependencies( Type => 'code' ) ) {
        return \'<em>', loc('(pending approval)'), \'</em>';
    } else {
        return \'<em><font color=AA8000>', loc('(pending other 

Collection)‘), '’;
}
} else {
return statusInColor($Ticket);
}
}

i.e. (line #'s may be off as my file has been edited elsewhere)

37c36
< return '‘, loc(’(pending approval)‘), '’;

       return "<em>" . loc('(pending approval)') . "</em>";

39c38
< return '‘, loc(’(pending other
Collection)‘), '
’;

       return "<em>" . loc('(pending other Collection)') . "</em>";

–stephen
Stephen Dowdy - Systems Administrator - NCAR/RAP
303.497.2869 - sdowdy@ucar.edu - http://www.rap.ucar.edu/~sdowdy/

Stephen,

That works, thank you very much. I will update the wiki with this
information.

Nathan Oyler wrote:

Request Tracker Wiki

The problem I have with it is that (pending approval) and (pending
other
Collection) show up with the tags around them.

So I was thinking I could remove the tags entirely, but it
seems
useful to have the emphasis there.

Does anyone know the reason why this happens? How I may correct this
issue?

Nathan,

This works for me:

if ( $Ticket->HasUnresolvedDependencies ) {
    if ( $Ticket->HasUnresolvedDependencies( Type => 'approval' )
         or $Ticket->HasUnresolvedDependencies( Type => 'code' ) )

{

        return \'<em>', loc('(pending approval)'), \'</em>';
    } else {
        return \'<em><font color=AA8000>', loc('(pending other

Collection)‘), '’;
}
} else {
return statusInColor($Ticket);
}
}

i.e. (line #'s may be off as my file has been edited elsewhere)

37c36
< return '‘, loc(’(pending approval)‘), '’;

       return "<em>" . loc('(pending approval)') . "</em>";

39c38
< return '‘, loc(’(pending other
Collection)‘), '
’;

       return "<em>" . loc('(pending other Collection)') .

“”;