<div dir="ltr"><div class="gmail_extra">Maciej,</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thank you! <br><br><div class="gmail_quote">2014-03-01 2:44 GMT+09:00 Maciej Dobrzanski <span dir="ltr"><<a href="mailto:reg.bestpractical@posterus.com" target="_blank">reg.bestpractical@posterus.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hajime,<div class="im HOEnZb"><br>
> Is it possible to not show 'reply' button when the $TransactionObj->Type is 'Comment'?<br></div><div class="HOEnZb"><div class="h5">
Of course it is possible. In 4.0 you can use ModifyCommand callback from /Ticket/Elements/<u></u>ShowTransaction to modify the list of transaction actions. In this callback you will be able to remove the 'Reply' link using a regular expression, for example:<br>

<br>
<%INIT><br>
return unless $TransactionObj->Type eq 'Comment';<br>
<br>
$$titlebar_cmd =~ s/\[.*?Action=Respond.*?\]//;<br>
</%INIT><br>
<%ARGS><br>
$TransactionObj => undef<br>
$titlebar_cmd => undef<br>
</%ARGS><br>
<br>
This won't work with 4.2 though, because ModifyCommand has been removed and ShowTransaction changed location. You will have to use Default callback from /Elements/ShowTransaction instead. The callback provides access to @Actions - an array of hashes representing various actions. Removing the link will be a matter of looping over the array and removing the right element (e.g. where class field will be equal to 'reply-link').<br>

<br>
Maciek<br>
<br>
</div></div></blockquote></div><br></div></div>