bugMHonArc - Bugs: bug #12802, SubjectStripCode not working on...


You are not allowed to post comments on this tracker with your current authentication level.

bug #12802: SubjectStripCode not working on message file

Submitted by:  jay <penf>
Submitted on:  Mon 25 Apr 2005 02:14:25 PM UTC  
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Behavior
Status:  Fixed Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Operating System:  All Perl Version:  5.8.4
Component Version:  2.6.10 Fixed Release:  2.6.11

Mon 02 May 2005 12:26:33 AM UTC, comment #5: 

Fixed applied to mhamain.pl and checked into CVS.

Earl Hood <ehood>
Project Administrator
Wed 27 Apr 2005 02:07:30 PM UTC, comment #4: 

I understand now what you are reporting.  I agree, the behavior
is inconsistent to what a user may expect.

The routing that converts the message header fields into html
works on the $fields hash directly, and since SUBJECTSTRIPCODE
is not applied to $fields->{subject}, the original subject
text will be rendered.

It appears that the fix you suggested is the simpliest that
fixes the problem.  I may add something that stores the
original subject in a special key of $fields for any
callback routines that may need it (and for potential
debugging purposes).

Earl Hood <ehood>
Project Administrator
Wed 27 Apr 2005 11:28:07 AM UTC, comment #3: 

I was not aware that this field was a raw value. For some reason it was the subject field in the generated messages. I am guessing that I did not set up the mrc file properly because I did not use $SUBJECT$.

The subject field shows up as follows in the output messages:

<!-- MHonArc v2.6.10 -->
<!--X-Subject: Re: Basing ... -->
<!--X-From-R13: "Rvvv" <vvv...> -->
<!--X-Date: 8 Apr 2005 03:55:46 &#45;0000 -->
<!--X-Message-Id: 003b01c53vv$vvv4095c45@D7VQX661 -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: d33vvvv0@vvvvv -->





&quot;Dvvvv&quot; &lt;xvvv@...&gt;


Re: Basing ...


Thu, 7 Apr 2005 20:56:02 -0700


&quot;Dvvvv&quot; &lt;xvvv@...&gt;




My mrc file specifies subject for the current message in one place:


I guess this causes the raw value to be emitted. So from what you are saying, it seems I should be using $SUBJECT$ instead.

jay <penf>
Tue 26 Apr 2005 05:43:41 PM UTC, comment #2: 
[Not a Bug]

I'm not sure where the bug is.  The $fields hash is an
internal data structure, and only exists for the life
when a message is converted.  After that, the subject
in the db is all that is known.

For custom coding purposes, the special x-mha-* keys
of $fields is defined for custom code to see what
mhonarc will use for certain data fields.  The $fields
hash is intended to represent the "raw" original data,
which can be accessed via callback routines.

As of now, I believe things work as designed.  Unless
more information is provided to justify this as a bug,
no changes will be made and this item will be closed.

A subtle behavioral note is that is Subject is specified
in the FIELDSTORE resource, then the original subject
string will be stored, not the one "stripped".  IMO, this
is acceptable since $SUBJECT$ should be used for rendering
subject text.  I.e.  It would be odd for a user to double
store subject text unless they have a need to store the
orginal unstripped version.

Earl Hood <ehood>
Project Administrator
Mon 25 Apr 2005 02:21:13 PM UTC, comment #1: 

Sorry, it should read:
$fields->{'subject'}[0] = $sub = subject_strip($sub)  if $SubStripCode;

jay <penf>
Mon 25 Apr 2005 02:14:25 PM UTC, original submission:  

SubjectStripCode is not applied to subject strings stored in the message itself. It is applied to the subject string stored in mhonarc.db, so it is also applied to any subject links FROM the message, just not the subject of the message itself.

In mhamain.pl:

$sub = subject_strip($sub)  if $SubStripCode;

$fields->{'subject'} = $sub = subject_strip($sub)  if $SubStripCode;

jay <penf>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.




Follow 6 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-05-20 ehood Open/ClosedOpen => Closed
    Fixed ReleaseCVS => 2.6.11
2005-05-02 ehood StatusConfirmed => Fixed
    Fixed Release => CVS
2005-04-27 ehood StatusNeed Info => Confirmed
2005-04-26 ehood StatusNone => Need Info

Back to the top

Powered by Savane 3.5