[Rtir] BugFix in RTIR 1.0.6rc1 ,
Was: several problems + versions to use.
Ruediger Riediger
ruediger.riediger at sun.com
Fri Dec 3 11:08:59 EST 2004
Hello,
I think I found the right place where things go wrong.
Ruediger Riediger wrote:
>> 3) When I write a comment on a ticket I get a "Status: Illegal value for
>> Status" message. (There is no way to set it on the comment form)
>
>
> That's for both Comment and Correspondence. The "Status" field is
> submitted empty, and an empty field is obviously an illegal value. I am
> currently investigating this... more to come.
In /opt/rt3/share/html/RTIR/Update.html, the following happens:
<%INIT>
[...]
unless($DefaultStatus){
$DefaultStatus=($ARGS{'Status'} ||$Ticket->Status());
}
This makes sense: if there is no "DefaultStatus" argument, substitute
the "Status" argument or the current ticket status. Below this line, the
page title is defined according to $DefaultStatus. So $DefaultStatus now
holds the expected Status change.
Now, when the page is build, The hidden form inputs below are used:
<input type="hidden" name="DefaultStatus" value="<% $ARGS{DefaultStatus}
%>">
<input type="hidden" name="Status" value="<% $ARGS{DefaultStatus} %>">
Well... for replies (or comments), the "DefaultStatus" is not passed on
on the URL. So $ARGS{DefaultStatus} is empty. That's why we set
$DefaultStatus like above. If now Update.html is called by submitting
the form, it tries to set the Status to the empty value. This causes the
"Status: Illegal Value" error, and therefore the missing Status update,
leading to the "Started" date not set.
Instead of $ARGS{DefaultStatus}, $DefaultStatus should be used. Here is
the diff for /opt/rt3/share/html/RTIR/Update.html:
34,35c34,35
< <input type="hidden" name="DefaultStatus" value="<%
$ARGS{DefaultStatus} %>">
< <input type="hidden" name="Status" value="<% $ARGS{DefaultStatus} %>">
---
> <input type="hidden" name="DefaultStatus" value="<% $DefaultStatus %>">
> <input type="hidden" name="Status" value="<% $DefaultStatus %>">
38c38
< % if ($Type eq 'Report' and $ARGS{'DefaultStatus'} eq 'rejected') {
---
> % if ($Type eq 'Report' and $DefaultStatus eq 'rejected') {
Time for a coffee.
Best regards,
Ruediger Riediger
--
Dr. Ruediger Riediger Sun Microsystems GmbH
NSG - SunCERT Komturstr. 18a
mailto:Ruediger.Riediger at Sun.com D-12099 Berlin
------------------------------------------------------------------------
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
------------------------------------------------------------------------
PGP 2048RSA/0x2C5020E9 964C E189 0FF0 8882 2BAB 65E2 6912 1FF2
------------------------------------------------------------------------
More information about the Rtir
mailing list