-----------------------------------------------------------------------
-----------------------------------------------------------------------
Release notes:
-----------------------------------------------------------------------
-----------------------------------------------------------------------

-----------------------------------------------------------------------
Version 2.1.7  02/04/2006
-----------------------------------------------------------------------

* Fixed bug 1404030 "javascript related to paging, sorting seems 
broken?".    In .NET 2.0, versus earlier versions, the id of the forms
changed from "_ctl0" to "ctl00".   Now btnet checks which version of
.NET is running and uses the appropriate form name.

* Fixed occasionally "access denied" error when writing to log by 
preventing concurrent access to it using "lock" keyword.

-----------------------------------------------------------------------
Version 2.1.6  01/29/2006
-----------------------------------------------------------------------

!!!! IMPORTANT !!!!
This release includes a major revision by Michael Wilson to how users 
control when they receive emails from the system.   You will need to 
make changes to you database structure in order to deploy this version.   
The SQL script for these changes is in the file "upgrade.sql", the 
section labeled "upgrade from 2.1.5 to 2.1.6".

Now the screen screens for controlling notifications include these 
categories:
Notifications for subscribed bugs reported by me:  	 	 
Notifications for subscribed bugs assigned to me: 		 
Notifications for all other subscribed bugs: 		 

For each category, you can make these choices:
no notifications
when created
when status changes
when status or assigned-to changes
when anything changes

You can also now receive notifications even on bugs that you have changed.

Also in this release:

* Fixed bug 1351070 "text gets wrongly converted to datetime for custom
field"

* Improved performance of btnet_service.cs, btnet_service/console.exe
for large attachments.   Old version sometimes spiked CPU to 100%.
Thanks to Sylvain Ross for this fix.

* Added "TrackingIdString" to Web.config which allows you to change
the text "DO NOT EDIT THIS:" in the subject line of emails to 
something else.   Needed both in Web.config file and in config file
used by btnet_console/service.exe.

* Logic for coming up with a name for the log file was in two places
and didn't match.    Now in one place.


-----------------------------------------------------------------------
Version 2.1.5  12/4/2005
-----------------------------------------------------------------------

**** EXTREMELY CRITICAL BUG FIX *****

* 1371108  "Attachment files deleted during mass update"  I apologize 
to folks who have lost data as a result of this bug.   This solves the 
mystery of some data that I've lost too at my real job.  Thanks to 
Michael Wilson for discovering this and fixing it.  

Also:

*  Fixed bug 1366049 "user cannot change Project in certain case".  
Thanks to "alexbrak" for this code.

*  For the screen capture utility, bug 1194476 "btnetsc.exe gets 'Bad 
Request (Invalid Verb)' error from IIS, I'm uploading a recompiled
version with the fix submitted by somebody anonymously.   It doesn't
seem to hurt anything.   I can't recreate the "Invalid Verb" error, but
maybe for those folks who get the error, this code is the solution.
Please let me know if this release fixes the error for you at
ctrager@yahoo.com.   Thanks.

-----------------------------------------------------------------------
Version 2.1.4  10/22/2005
-----------------------------------------------------------------------

Thanks to "alexbrak" and "hvdakker" for a couple of the fixes in this 
release.

Added "SearchSQL" in Web.config per RFE 1295604.  This allows you to
customize which columns are displayed in the search page.

* Fixed bug 1292282 "edit_bug.aspx uses bugid instead of commentid in 
from link"

* Fixed bug 1304359 "can't delete custom field w/constraint that 
contains spaces"

* Fixed bug 1304365 "error message fails to support SingularBugLabel 
setting"

* Fixed bug 1305200 "apostrophe in from email address causes problem"

* Fixed bug 1305890 "short_desc should be replaced with subject in 
insert_bug"

* Fixed bug 1313879 "Attachments with spaces are not downloaded 
correctly"

* Fixed bug 1315001 "Login form accept cripted passwords"

* Fixed bug 1325567 "Problem with entering date/time in custom field"

-----------------------------------------------------------------------
Version 2.1.3  09/25/2005
-----------------------------------------------------------------------

Added the following Web.config settings for btnet_service.exe and
btnet_console.exe, and recompiled those files.

The new settings help with testing and capturing emails that cause
errors.

Use "MessageOutputFile" to dump the input.
Use "MessageInputFile" to feed them input from a file instead of from
a POP3 server.

Also:

Credit again goes to Jochen Jonckheere for several of the changes:

* Fixed bug 1299905 "guest permissions not being reduced from ALL to 
REPORTER"

* Fixed bug 1291537 "util.this_fullname set incorrectly"

* Fixed bug 1288156 "project customisable fields do not retain selection
on edit"

* Fixed bug 1292218 "DefaultPermissionLevel used if no forced project 
defined"

* Fixed bug 1297553 "An e-mail with DO NOT EDIT THIS for a bug that is 
deleted"

* Fixed bug 1279548 "auto-reply e-mail comming from wrong person"

* Added "reply all" functionaly per RFE 1280708

* Added bugid to auto-reply subject per RFE 1279540

-----------------------------------------------------------------------
Version 2.1.2  09/10/2005
-----------------------------------------------------------------------

Credit goes to Jochen Jonckheere for several of the fixes in this 
release.

* Fixed 1280731.   Users without permission to add bugs were able to 
add them.   Now, if you force a user to a specific project, and if
that project doesn't have add rights, then a user can't add a bug.

* Fixed bug 1285992, endless loop when autoreply to/from addresses are
the same.

* Fixed bug 1285729 "send_mail.aspx doubles new line".  I commented out
the line.  I hope this helps.

* Fixed bug 1278982 "DIV-tag on wrong place" in bugs.aspx

* Fixed bug 1278964 "SPAN-tag not closed in menu" in util.cs

* Fixed bug 1277422 "reply link not available for non-admins"

* Fixed bug 1257368 "util.cs:405 invalid cast exception"

* Fixed bug 1255880 "Date picker gives javascript error when clicked"

* Fixed bug 1238322 "String comparisons are case sensitive in pop3 bug 
insert"

* Fixed 1280720 and 1272577 - Notifictions not sent when a bug was
added if user wanted only status changes.


-----------------------------------------------------------------------
Version 2.1.1  07/09/2005
-----------------------------------------------------------------------

* Added additional search field: "Bug comments since", for finding bugs
to which a comment has recently been posted.

* Fixed bug 1233504 "in email notification, error when clicking on 
email addr"

* Fixed bug 234816 "error with links in BugDescritpion via BUGID#XXX"

* Fixed bug 1233627 "Error in Custom Date Field" when name of custom
field contains a space and when you try to show the calendar date
picker.

* Fixed bug 1232461 "invalid project in btnetsc results in 'obj ref not
set' error

* Added example querys to setup.sql that demos using css classes for
formating bugs and demoing a way to show the most recent comment in
the bug list.


CHANGES TO BTNETSC.EXE too:


* In btnetsc.exe, fixed bug 1223432 "btnetsc Bug not going to numbered 
project"

* In btnetsc.exe, if somebody enters "http://" in the url in the
configuration page, the program strips it off rather than getting
an error when doing the send.


-----------------------------------------------------------------------
Version 2.1.0  07/04/2005
-----------------------------------------------------------------------

* Fixed bug 1202186 "Session ID conflicts with mutliple installs on 
1 server" using code from Michael Wilson.

* Fixed bug 1212800 "Status change not detected when TrackBugHistory 
= 0"

* Didn't fix 1225521 "occasional log file not found error", but I 
did fix the error message.  I suspect the real problem is something
else, but this error message was displayed INSTEAD of whatever the
real problem is.

* Fixed bug 1229656 "Bug page expires when returning from detail page"

* For RFE 1220637 "Set default values for dropdowns", Now you
can control what values show up in the dropdowns with these new
Web.config settings.   Thanks to Michael Wilson.    My spelling
of these keys is a bit different than the spelling in the code
Michael posted.

<add key="DefaultProject" value="[no project]"/>
<add key="DefaultCategory" value="[no category]"/>
<add key="DefaultPriority" value="[no priority]"/>
<add key="DefaultStatus" value="[no status]"/>
<add key="DefaultUserDefinedBugAttribute" value="[none]"/>

* For RFE 1232110, log file filenames now have leading zeros when day 
or month is a single digit.   2005_07_04 intstead of 2005_7_4.

* URLs and email addresses in bug comments are converted to 
clickable links.   Thanks to Jason Taylor.

* Now handling single quotes in category, priority, status, udf fields
correctly when recording updates.

-----------------------------------------------------------------------
Version 2.0.9  05/28/2005
-----------------------------------------------------------------------

Bug fixes only:

* A few fixes from Michael Wilson in util.cs, including "us_fullname"
bug, 

* Fixed bugs - again - related to replying to emails and the system
mixing up the id of the bug and the id of the comment.   This problem
would result in "Object reference not set" errors.

* The 2.0.8 change "Email attachments no longer have the number
prefixes on their filenames..." wasn't working because I left in some
debugging code.

-----------------------------------------------------------------------
Version 2.0.8  05/14/2005
-----------------------------------------------------------------------

* Fixed a bug parsing "From" in emails.   When a "From: " line was
contained in the body, the "From" from the body was used instead of the
correct one from the header.   I recompiled btnet_console.exe and
btnet_service.exe.  

* Fixed "Object reference not set to an instance of an object" bug
when replying to incoming email replies.

* Added "export to excel" links to bugs.aspx and search.aspx.

* The Web.config setting "UseFullNames" now affects more places
in edit_bugs.aspx than it did before.

* Added extra Web.config setting "SmtpForceReplaceOfBareLineFeeds".
Ignore this setting unless you are esperiencing the symptoms described
in bug #1194530 and here: http://cr.yp.to/docs/smtplf.html

* Added Web.config setting "AutoReplyText".   51aspx.com can 
automatically respond to incoming emails using the specified text.

* Email attachments no longer have the number prefixes on their
filenames in the email itself.   I'm referring to the prefixes that are 
created when the file is saved as an attachment in the upload folder.

* For attachments, there are now now two links: "view" and "save".   
"Save" forces a save dialog box, as before, but "view" will allow you to
view the attachment, if the browser understands how to do it.

* Michael Wilson fixed the "credential conflict" bug described in
bug #995410.

* Fixed a couple other minor bugs related to authentication.  Removed
"logoff" link from menu if windows authentication, because you actually
can't logoff.   Fixed bug where logon page's username field was 
populated with something that looked like "1:username".


-----------------------------------------------------------------------
Version 2.0.7  04/23/2005
-----------------------------------------------------------------------

* Added file upgrade.sql.   Run it to upgrade to upgrade to this
version.   It justs adds a column to the bug_attachments table.

* In bug comments that are from emails, if there is an attachment, an
attachment link also shows up at the bottom of the comment text for that
emai.   This change isn't retro-active to bugs added prior to installing 
this version, but there is some SQL in upgrade.sql you might want to try
that could make this feature work for you for previously entered bugs.

* This version no longer supports the Web.config setting
"ShowInitialCommentFirst" because I ended up thinking that the 
presentation was too confusing.   And coding it was kind of messy too.

This version does, however, still support "CommentSortOrder", so if
you want this first comment on top, you can still do that.

* On the "queries" page, added ability to export the bug list to excel.
It's actually just a tab delimited text file.

* default.aspx now supports having some custom HTML printed on it.
See "CustomWelcomeHtml" in Web.config.

* admin.aspx now displays the physical path and machine name.

* Revised "mixed mode" security.   My two-virtual-directory scheme was
not good.   The setting in Web.config "AllowLogonIfWindowsAuthFails" is 
now obsolete.   

Instead, the setting "WindowsAuthentication" now allows a value of 2 for 
using both form-based and windows authentication at the same time.  
See instructions in Web.config on how to configure IIS security.

* There's an instance of 51aspx.com I have set up where the "project"
dropdown doesn't really apply, so I wanted to hide it.   I ended up
adding element ID's to all of the dropdowns and their labels in 
edit_bugs.aspx, so that they can be selectively hidden via the style
sheet.   For example, to hide the "category" dropdown and its label:
#category_label {display:none;}
#category {display:none;}
You can also use the style sheets to change the look of the global
custom fields (but not the project specific custom dropdowns.


-----------------------------------------------------------------------
Version 2.0.6  04/16/2005
-----------------------------------------------------------------------

* TRY THE NEW SCREEN CAPTURE UTILITY!.    It's a seperate download
from the btnet project page on sourceforge.

* Fixed bugs in javascript that sorts HTML tables when you click on
column headings.

* Fixed bug# 1161208 - special chars were displaying wrong in 
notification emails.

-----------------------------------------------------------------------
Version 2.0.5  04/03/2005
-----------------------------------------------------------------------

* Fixed javascript error on search.aspx "Save SQL as query" link.

* Added pop-up for selecting dates for custom bug fields when datatype
is date.

* If you add a "PromptBeforeLeavingEditBugPage" key to Web.config and
set it to "1", then clicking on "add attachment", "send email" will
display a confirmation prompt.

-----------------------------------------------------------------------
Version 2.0.4  04/02/2005
-----------------------------------------------------------------------

* Moved release notes to this file, RELEASE_NOTES.TXT

* Updated tips in README.TXT.   Even if you are already using btnet, 
maybe take a look at them.

* Fixed bug with search.aspx "to" dates.

* Added concept of "Guest" account.  Just name the user "Guest" and no 
matter what the other settings say, the user will be allowed no greater
than "Reporter" permissions.    You can explicitly reduce the 
permissions even more by just editing the account.

* Now supports plain and windows authentication at the same time.
See note in Web.config above the WindowsAuthentication key.

* See these new settings in Web.config.
<add key="CustomBugLinkLabel" value="YOUR LINK"/>
<add key="CUstomBugLinkUrl" value="your_url.aspx"/>
<add key="CustomMenuLinkLabel" value="YOUR LINK"/>
<add key="CUstomMenuLinkUrl" value="your_url.aspx"/>

-----------------------------------------------------------------------
Version 2.0.3  03/28/2005
-----------------------------------------------------------------------

* Recompiled btnet_service.exe, btnet_console.exe to correct problem
with incoming emails updating existing bugs failing to be processed.
This bug was introduced in version 1.9.8.

* Javascript for sorting HTML tables now works with Firefox too.

-----------------------------------------------------------------------
Version 2.0.2  03/26/2005
-----------------------------------------------------------------------

* Closed some SQL injection vulnerabilities.   Thanks to Maty Siman at 
http://www.checkmarx.com.

* Added mass update/delete to search.aspx for admins.   Too hard to
add it for non-admins and still respect all the project permissions.

* Corrected this setting in Web.config (HH, instead of hh):
<add key="SQLServerDateFormat" value="yyyy-MM-dd HH:mm:ss" />

-----------------------------------------------------------------------
Version 2.0.1  03/17/2005
-----------------------------------------------------------------------

Important bug fixes.

* Merging bugs feature was broken.  Fixed now.

* Handling of plain text incoming emails was broken.  Fixed now.

* Fixed javascript error in edit_priority.aspx

-----------------------------------------------------------------------
Version 2.0.0  03/13/2005
-----------------------------------------------------------------------

* added "reply" link in edit_bug.aspx, which quotes the email you are 
replying to.

-----------------------------------------------------------------------
Version 1.9.9  03/13/2005
-----------------------------------------------------------------------

* TO MIGRATE TO 1.9.9, RUN THE FOLLOWING:
alter table users add us_auto_subscribe_reported_bugs int null default(0)
update users set us_auto_subscribe_reported_bugs = 0

* Added ability to automatically subscriber to bugs that you report.

* Revised edit_user.aspx and edit_self.aspx layout and on screen 
explanations in order to make them less confusing to the user.

* Attachments to incoming emails are now saved as attachments to the
bug.  

* To and Cc headers in incoming email are now saved as part of the 
comments.

* Added ability to add a custom link to the edit_bug.aspx page, just
to the left of the "prev", "next" links.   See Web.config:
<add key="CustomBugLinkLabel" value="YOUR LINK"/>
<add key="CUstomBugLinkUrl" value="your_url.aspx"/>

* Admin editing of priorities now gives feedback on color.

-----------------------------------------------------------------------
Version 1.9.8  03/10/2005
-----------------------------------------------------------------------

* MAJOR CHANGES in how incoming emails are handled.  Btnet_console.exe 
and btnset_service.exe have been recompiled as part of this change.
Also notice two new dlls in the bin folder.  I used the following
command line to compile SharpMimeTools.dll:

csc /debug /R:log4net.dll emailmessage2.cs sharpmimemessage.cs 
sharpmimeaddress.cs sharpmimeheader.cs sharpmimetools.cs 
sharpmimemessagestream.cs sharpmimemessagecollection.cs abnf.cs

The MIME parsing is now done using "SharpMimeTools", excellent work
from the SharpWebMail project.   Thanks to SharpMimeTools, non-ascii
emails are now handled correctly.

I plan to handle incoming file attachments in the next release, too.

Also:

* Comments on existing bugs coming in via btnet_console/service now
include the subject as part of the comment text.

* Fixed handling of nvarchar custom fields.

-----------------------------------------------------------------------
Version 1.9.7  03/06/2005
-----------------------------------------------------------------------

I've changed the VARCHAR types in setup.sql to NVARCHAR types, in order
to handle Unicode.    I've also changed all the logic that builds SQL
statements to build SQL using Unicode literals.   For examle, where it
used to say:  Update foo set bar = '$1', it now says set bar = N'$1'.

I might have may missed a couple places, so if you encounter a bug,
post it at sourceforge and I'll try to post an updated release as soon
as possible, within days.

Unicode strings use two bytes per char, so in setup.sql I've doubled
the length of strings.   In a few places I've more than doubled, where
I thought the lengths were too short anyway.

I've also changed the columns bc_comment and a couple others from
varchar to ntext, so that there isn't a size limitation.

The ALTER TABLE script below worked for me and I hope it works for you.

Also in this release: Changed dbutil to use database connections with 
very brief lifespans, rather than keeping them open for the entire 
sever-side page generation (Thanks Jason C.).

- - - - - - - - - - - - - - - - - 


alter table users alter column us_username nvarchar(40) 
alter table users alter column us_password nvarchar(64) 
alter table users alter column us_firstname nvarchar(60) 
alter table users alter column us_lastname nvarchar(60) 
alter table users alter column us_email nvarchar(120) 

alter table categories alter column ct_name nvarchar(80) 

alter table projects alter column pj_name varchar(30) 

alter table projects alter column pj_name nvarchar(80) 
alter table projects alter column pj_pop3_password nvarchar(20) 
alter table projects alter column pj_pop3_email_from nvarchar(120) 

alter table projects alter column pj_custom_dropdown_label1 nvarchar(80) 
alter table projects alter column pj_custom_dropdown_label2 nvarchar(80) 
alter table projects alter column pj_custom_dropdown_label3 nvarchar(80) 
alter table projects alter column pj_custom_dropdown_values1 nvarchar(2000) 
alter table projects alter column pj_custom_dropdown_values2 nvarchar(2000) 
alter table projects alter column pj_custom_dropdown_values3 nvarchar(2000) 

alter table bugs alter column bg_short_desc nvarchar(200) 

alter table bugs alter column bg_project_custom_dropdown_value1 nvarchar(120) 
alter table bugs alter column bg_project_custom_dropdown_value2 nvarchar(120) 
alter table bugs alter column bg_project_custom_dropdown_value3 nvarchar(120) 

alter table bug_comments alter column bc_comment ntext 
alter table bug_comments alter column bc_email_from nvarchar(800) 
alter table bug_comments alter column bc_email_to nvarchar(100) 

alter table bug_attachments alter column ba_file nvarchar(1000) 
alter table bug_attachments alter column ba_desc nvarchar(200) 
alter table bug_attachments alter column ba_content_type nvarchar(200) 

alter table user_defined_attribute alter column udf_name nvarchar(60) 

alter table statuses alter column st_name nvarchar(60) 
alter table statuses alter column st_sort_seq int
alter table statuses alter column st_style nvarchar(30) 

alter table priorities alter column pr_name nvarchar(60) 
alter table priorities alter column pr_sort_seq int
alter table priorities alter column pr_background_color nvarchar(14) 
alter table priorities alter column pr_style nvarchar(30) 

alter table queries alter column qu_desc nvarchar(200)
alter table queries alter column qu_sql ntext

alter table reports alter column rp_desc nvarchar(200) 
alter table reports alter column rp_sql ntext 


-----------------------------------------------------------------------
Version 1.9.6  02/06/2005
-----------------------------------------------------------------------

* Fixed problems with dates on search.aspx.  I hope.

* Added "UseFullNames" setting in Web.config.  Controls how user names
show up in dropdowns.

* Added pseudo variable $ME for use in reports.

* Bolding of selected menu items now controlled via style sheet.

* AllowCommentDeletionForNonAdmins now also allows editing of comments.

* You probably want to run this to allow for longer attachment
filenames:
alter table bug_attachments alter column ba_file varchar(256)

-----------------------------------------------------------------------
Version 1.9.5  10/09/2004
-----------------------------------------------------------------------

* Fixed crash in edit_status.aspx and edit_priority.aspx

* Revised logic for internationalizing dates.   See Web.config.  Thanks
to Martin Ricther.   I used your code verbatim.

* Fixed bug where adding a comment caused prior update history to not
be displayed.

* Added this line in send_email.aspx per discussion in Help forum 
"Mail trouble/question":
body_text = body_text.Replace("\n","\r\n");

* Added some validation for custom fields, for datetime, int, and 
decimal formats.

* You can now make a custom field required.  (Logic just looks at
whether the field is NULL or NOT NULL).


-----------------------------------------------------------------------
Version 1.9.4  9/20/2004
-----------------------------------------------------------------------

* Only one change since 1.9.3 - fixed an important bug.   Adding just a
comment to an existing bug didn't work.   To fix, I added the following
line to edit_bug.aspx after line 772:

|| comment.Value.Length > 0


-----------------------------------------------------------------------
Version 1.9.3  9/19/2004
-----------------------------------------------------------------------

* Fixed null/not null problems in setup.sql

* Fixed some places where "bug" should have been replaced by Web.config
setting SingularBugLabel.  Also, appropriately capitalizing the
lable.  Thanks Tom Sella - I used your code verbatim.

* No longer using hard-coded scheme for bug attachments content
type.   Instead, storing PostedFile.ContentType. Thanks "nickbeen".

* Now checking for changes before updating bg_last_updated_user,
bg_last_updated_date.

* search.aspx now allows search on bugs with no specified category,
status, priority, project, assigned-to.

* Added "LogoHtml" setting in Web.config.   That allows you to set
the logo and its link to whatever you want.

-----------------------------------------------------------------------
Migrating to 1.9.3
-----------------------------------------------------------------------

alter table bug_attachments add ba_content_type varchar(100) null

-----------------------------------------------------------------------
Version 1.9.2  9/03/2004
-----------------------------------------------------------------------

* Search "to" dates now go through then end of the "to" day, 
to the time 23:59:59

* Corrected instructions for migrating to 1.9.1 below.  Added update
statements.

* Fixed crash when merging bugs that also have subscriptions.

* The first column of bug queries used to be unconditionally
interpreted as a bgcolor for the "<td>" element.    That's still true as
long as the text start with an "#", as in "#ffaaaa".   However, if the
first column does not start with an "#", the first column is 
interpreted as a css style class.   For example, "<td class=yourclass".

You can also now enter a css style class for a status and/or a priorty.

I've changed the explanatory text on the edit_query.aspx to relect
this change.


* Added sort sequence to categories and user_defined_attributes. 
They now behave like statuses and priorities.   Also, sorts now look
at name too as a secondary sort field.


-----------------------------------------------------------------------
Migrating to 1.9.2
-----------------------------------------------------------------------

alter table user_defined_attribute add udf_sort_seq int not null default(0)
alter table categories add ct_sort_seq int not null default(0)
alter table priorities add pr_style varchar(10) not null default('')
alter table statuses add st_style varchar(10) not null default('')


-----------------------------------------------------------------------
Version 1.9.1  8/27/2004
-----------------------------------------------------------------------

* AppTitle setting in Web.config also affects the web page titles
(i.e, the <title> element).

* Adding an attachment creates an entry in bug change history

* Adding an attachment or sending an email triggers notifications

* Fixed bug whereby same user could subscribe twice to same bug.

* Fixed bug whereby bugs entered by email that triggered notifications
resulted in "Object reference not set to an instance of an object"
in util.cs.

* Used contributor jhetler's idea and code for imbedding a print of 
the bug in send_email.aspx when "include bug description" is checked.

* Used contributor ekalinin's idea about an option allowing users to 
send notifications to themselves.   See edit_user.aspx,
edit_self.aspx.

* Used contributor ekalinin's idea about an option allowing users to 
receive notifications only when status changes.   See edit_user.aspx,
edit_self.aspx.

* Added ability to edit SQL for reports with help from 
contributor regent10.

-----------------------------------------------------------------------
Migrating to 1.9.1
-----------------------------------------------------------------------

Corrected this file so that the alter table statement for 1.8.6 reads:
    alter table users add us_only_status_change_notifications int null default(0)

Use this SQL to drop the bogus field:
    alter table projects drop column add us_only_status_change_notifications

Also run this:
alter table users add us_send_notifications_to_self int null default(0)
update users set us_only_status_change_notifications = 0
update users set us_send_notifications_to_self = 0

-----------------------------------------------------------------------
Version 1.9.0  8/20/2004
-----------------------------------------------------------------------

Small changes:

* The pages no longer let you delete a project, user, category, 
priority, status or user_defined_attribute value if it is still being
referenced by a bug.

* Delete confirmation pages echo the name of the item being deleted
when they are prompting the user for confirmation.

* Replaced my edit_user_permissions2.aspx with one from Eugene Kalinin
per bug 1010967, List all users on "per user permissons".

* Fix to how links to interior pages are handled when user isn't logged
in.   Query string vars were getting truncated.

* Fix to how white space is handled when printing custom text fields.

-----------------------------------------------------------------------
Version 1.8.9  8/18/2004
-----------------------------------------------------------------------

Important bug fix again:

* The printed and emailed bugs were broken so that they were printing 
the id's rather than the descriptions of fields like status, category, 
etc.   Fixed that.

And less serious

* Custom textarea fields are now HTML encoded for display on
edit_bugs.aspx page and on for printing/emails.

I'd like to think that this version is pretty stable.

-----------------------------------------------------------------------
Version 1.8.8  8/16/2004
-----------------------------------------------------------------------

Bug fixes only, but important ones.

* In version 1.8.7, the alter script in this README.TXT was STILL wrong.
I corrected it again from bg_custom_project...  to bg_project_custom...

* Starting with version 1.8.5, the user dropdowns are filtered so that
a given user doesn't see other users with whom that user doesn't have
any projects in common.    In this release I have changed the queries
that implement the feature to fix a bug.   Also, the admin user is now
treated just like any other user.

-----------------------------------------------------------------------
Version 1.8.7  8/16/2004
-----------------------------------------------------------------------

The only change is a correct to the SQL "alter" statements below,
for migrating to 1.8.6.

I originally wrote bg_custom_project_dropdown1_value, etc.   
That's wrong.
It should be bg_custom_project_dropdown_value1

I corrected it below.


-----------------------------------------------------------------------
Version 1.8.6  8/14/2004
-----------------------------------------------------------------------

* Now supports custom dropdowns specific to a project.  For 
example you could set up project #1 to have a custom dropdown of
"Version" with values of "1.0", "2.0", but for project #2 it would have
the values of "3.1", "3.2".   Go to an existing project and edit it to
try out this feature.

This is a complicated feature to implement.  I probably made a mistake
or two.  Please help me by reporting any bugs you find and I'll try to
fix them ASAP and post a new version.   

I apologize in advance if this new feature causes you any inconvience.

-----------------------------------------------------------------------
Migrating to 1.8.6
-----------------------------------------------------------------------

alter table projects add pj_enable_custom_dropdown1 int null default(0)
alter table projects add pj_enable_custom_dropdown2 int null default(0)
alter table projects add pj_enable_custom_dropdown3 int null default(0)
alter table projects add pj_custom_dropdown_label1 varchar(30) null
alter table projects add pj_custom_dropdown_label2 varchar(30) null
alter table projects add pj_custom_dropdown_label3 varchar(30) null
alter table projects add pj_custom_dropdown_values1 varchar(1000) null
alter table projects add pj_custom_dropdown_values2 varchar(1000) null
alter table projects add pj_custom_dropdown_values3 varchar(1000) null

alter table bugs add bg_project_custom_dropdown_value1 varchar(40) null
alter table bugs add bg_project_custom_dropdown_value2 varchar(40) null
alter table bugs add bg_project_custom_dropdown_value3 varchar(40) null

alter table users add us_only_status_change_notifications int null default(0)

-----------------------------------------------------------------------
Version 1.8.5  8/12/2004
-----------------------------------------------------------------------

Bug fixes only.

* Fixed bug related to selecting item in "re-assign" dropdown on 
edit_bug.aspx.   This bug was introduced in version 1.8.4.

* Now preserving white space and line breaks in custom fields

* Now Handling double quotes in custom fields properly


-----------------------------------------------------------------------
Version 1.8.4  8/09/2004
-----------------------------------------------------------------------

* Added ability to delete file attachments.   Also added setting in
Web.config to turn the feature on and off:
<add key="AllowAttachmentDeletionForNonAdmins" value="0"/>

* added "id" column to the admin pages that list things, 
like categories.aspx.

* In search, show inactive users and projects in dropdowns too.

* In search, if admin user, show all uesrs and projects regardless of
permission.

* In dropdowns in edit_bug.aspx and search.aspx, only show users 
related to projects that user has permissions for.   To really see the
effect of this, DefaultPermissionLevel in Web.Config should be set to
0.

* Version 1.8.2's base and custom css thing broke the the emails.  Now
the emails use both the base and custom style sheets too.

* Merging bugs now creates a comment belonging to the "into" bug, 
recording the act of merging itself. 

-----------------------------------------------------------------------
Version 1.8.3  7/31/2004
-----------------------------------------------------------------------

* Version 1.8.2 broke the hyperlinks feature.  This release fixes it.

* What broke the hyperlinks was the way I was handling trying to
preserve white space in the comments.   I changed it again.  
Line breaks are converted to "<br>".
Tabs are converted to "&nbsp;&nbsp;&nbsp;&nbsp;".
One space is left alone.
Two spaces are converted to " &nbsp;"

-----------------------------------------------------------------------
Version 1.8.2  7/29/2004
-----------------------------------------------------------------------

* Fixed problem with comment formatting that resulted in the text not
word-wrapping.

* Added the option to show the initially entered comment on top, like
Sourceforge does, when the general order of comments is most recent
first, i.e., "desc" in Web.config

* Made it easier to customize css.   Put your customizations in
btnet_custom.css instead of btnet.css and then as I change btnet.css, 
your overrides in btnet_custom.css will still work.    Thanks to
Michael Wilson for this idea.

* Maybe you like a more neutral word like "issue", "ticket", or "item"
rather than "bug"?  Added settings to web config that allow you to get 
rid of most occurrences of the word "bug" in the user interface for 
non-admin users:

	<add key="AppTitle" value="Customer Support"/>
	<add key="SingularBugLabel" value="Item"/>
	<add key="PluralBugLabel" value="Items"/>
	<!-- customize marker for creating hyperlinks in bug comments -->
	<add key="BugLinkMarkerx" value="itemid#"/>
	
* Made btnet_service.exe and btnet_console.exe a little more robust
when encoutering problems communicating with web server.   Also, they
don't choke now when encountering an unusual "multipart" type.

-----------------------------------------------------------------------
Version 1.8.1  6/26/2004
-----------------------------------------------------------------------

* Added feature allowing one bug to be merged into another.  

Added a new setting in Web.config, "AllowBugMergingForNonAdmins", that 
controls whether non-admins have access to this feature.

* Formatting of bug comment text is now preserved.

* When deleting a bug, attachments are now deleted too.   You might 
need to adjust permission on the file upload folder.

* Added new page "view subscribers" so you can see who is subscribed 
to a bug.

* Added Web.config option "EncryptStoredPasswords".   See note on 
migrating below.    Btnet now checks for both the encrypted and 
unencrypted versions of the password, so there's no need to convert 
existing data.   The unencrypted passwords will still work.

If you want to convert, the only way I have provided is
to go reset the passwords one by one using the web pages.    I didn't
provide a tool to conver them all at once.

-----------------------------------------------------------------------
Migrating to 1.8.1
-----------------------------------------------------------------------

You only need to run this if you set EncryptPasswords to "1"

alter table users alter column us_password varchar(32) not null
	
-----------------------------------------------------------------------
Version 1.8.0  6/18/2004
-----------------------------------------------------------------------

* Emails are now sent by default as just one email with many 
recipients.  Added new Web.config setting, "SendJustOneEMail".   If you
liked things better the old way, change this setting to "0".    Thanks 
for the code, Victor.

* Fixed bug where custom fields weren't saved on an add, just an 
update.

* On the login page, now filling in the username with previously used
username.

-----------------------------------------------------------------------
Version 1.7.9  6/12/2004
-----------------------------------------------------------------------

* Added "Reporter" permission.    Reporters can add bugs, update
comments, upload attachments, but can't change status, assignment
etc after adding bug.   Works best when you set user's "forced project".

* Added user's "forced project".   If set, user is limited to adding 
bugs to the specified project.

* Added "PrintHistory" setting to Web.config.  Controls whether 
change history is included in print of bugs.    Note however, the
same logic is used to print the email notifications.

* Added page for changing per user per project permissiong coming from
the project in addition to the one that already exists coming from the
user.

* Added links from search page to "print list" and "print detail"

* Added custom columns to search screen results

* Changed how the edit_bugs.aspx looks for users with View Only
permissions.  

* Lots of little bug fixes, including newly recompiled btnet_console.exe
and btnet_service.exe.   They no longer crash on multiplart/mixed emails.


-----------------------------------------------------------------------
Migrating to 1.7.9
-----------------------------------------------------------------------

alter table users add us_forced_project int null

-----------------------------------------------------------------------
Version 1.7.8 4/17/2004
-----------------------------------------------------------------------

* Made bugs per page a user setting rather than a global setting.
Web.config's "BugsPerPage" is obsolete
You have to run this sql:
alter table users add us_bugs_per_page int null

* Added ability to print the details of multiple bugs at once

* Added links for printing bugs on bugs.aspx page.   If you sort the 
list by clicking on the column headings, you can then print the list
in that sort order.

* Uses TextArea controls instead of Input controls for large custom
fields.  Thanks to "wulfman2u" for submitting the code for this change
in RFE #935798


-----------------------------------------------------------------------
Version 1.7.7 3/30/2004
-----------------------------------------------------------------------

* Now recording changes to custom columns in bug's audit trail

* Added "logged in as" feedback in upper right

* Added new link on admin page to new custom fields pages.   These 
pages help you generate the sql to add custom fields to bugs table.


-----------------------------------------------------------------------
Version 1.7.6 3/03/2004
-----------------------------------------------------------------------

* Custom fields now appear on print_bug.aspx and email notifications.

* When adding new bug, project dropdown defaults to last project
you worked with, not merely last project you added a bug to.

* Bugs page now remembers the last query you selected in dropdown

Bug Fixes:

* Added "Reported On" to print_bug.aspx

* Updating a bug with custom date field preserves the null.

* Date picker (calendar.js) is now works with European date formats.

* util.cs no longer changes the case of the SQL in order to modify
it to apply permissions.


-----------------------------------------------------------------------
Version 1.7.5 2/27/2004
-----------------------------------------------------------------------

* Added support for adding one attachment to outgoing emails.   
Attachments to emails become bug attachments too.   It's not a very 
nice implementation, but it's better than nothing.  

* Now checking that to, from, and subject fields of outgoing email 
are not blank.

Bug Fixes:

* Added missing column "us_auto_subscribe_own_bugs" to users table in
setup.sql

* Emails generated by clicking on "send email" link have proper magic
words in subject so that replies to them are posted back to same bug.

* Custom date fields now work when adding a new bug as opposed to just
updating an existing bug.  (no problem with other data types).
To add a custom field, use SQL like this to alter the bugs table:

alter table bugs add [Target Completion Date] datetime null


-----------------------------------------------------------------------
Version 1.7.4 2/19/2004
-----------------------------------------------------------------------


Added new setting "DefaultPermissionLevel" in Web.Config.   Previously,
default permission meant allow everything unless specifically denied.
Now you can set btnet to deny everything unless specifically allowed.

Added new way to subscribe to email notifications, Auto Subscribe Own.
When set, user to whom bug is assigned is automatically subscribed to
receive notifications.   See note below "Migrating to 1.7.4.

Added new values to Web.config which I hope help with date localization.
This isn't meant to be a complete solution yet.


"JustDateFormat" - use this to specify the date format without time

"SQLServerDateFormat" - tell btnet how SQL Server dates are formated.
I'm not sure if this really works.

These should help with custom columns of type datetype.   These should
also help allow users to enter dates in local format on the search page.
The calendar control still returns dates in YYYY-MM-DD format, however.


Other Bug fixes:

* Better handling of email errors.  Instead of crash, error message is
returned to user and info is written to log.

* Now able to turn off logging via LogEnabled setting in Web.config.

* Better handling of custom columns.   Now works with DateTime and
nvarchar.


-----------------------------------------------------------------------
Migrating to 1.7.4 
-----------------------------------------------------------------------

Run this sql:

alter table users add us_auto_subscribe_own_bugs int null default(0)
update users set us_auto_subscribe_own_bugs = 0



-----------------------------------------------------------------------
Version 1.7.3 2/7/2004
-----------------------------------------------------------------------

btnet_console.exe and btnet_service.exe now use these settings 
in Web.config as their btnet user/password when inserting bugs.'

<add key="ServiceUsername" value="email2"/>
<add key="ServicePassword" value="x"/>

These entries replace the "username" and "password" entries.

* Also for btnet_console and btnet_service, added new 
"SubjectCannotContain" entry to Web.config.   If not blank,
then emails containing the string are skipped.

* Bug descriptions are now hotlinks if the column heading starts with
the chars "DESC" (case insensitive).


Bug fixes:

* Fixed view_attachment.aspx.  Copyright notice had been part of 
response.

* Fixed page title of print_bug.aspx

* Now works with case-sensitive databases.

* Don't send notifications to users w/o view permission.

* Don't allow multiple default queries.

* Don't show "add attachment" and "send email" links for view only
users.

* No longer using hardcoded "email/x" username/password in 
btnet_service.exe and btnet_console.exe.   
Instead using "ServiceUsernname" and "ServicePassword".


-----------------------------------------------------------------------
Version 1.7.2 12/18/2003
-----------------------------------------------------------------------

* You can add custom columns to the bug table and they will
show up in the edit_bug.aspx form.   For example, if you want
a version field, execute:

alter table bugs add version varchar(20) null

No validation yet.   If you enter non-numeric data or a string that's
too long or leave a required field blank, you will not get a friendly
error message.

-----------------------------------------------------------------------
Version 1.7.1 12/9/2003
-----------------------------------------------------------------------

bug fixes only

* fixed inc_insert_bugs.aspx so as not to insert additional, duplicate,
subscriptions each time bug is changed

* fixed setup.sql to add missing comma in 
"create table project_user_xref"

-----------------------------------------------------------------------
Version 1.7.0 12/6/2003
-----------------------------------------------------------------------

* see note below how to migrate to this version.

* save queries as either "public" or "private".   "private" queries
are only visible to the person wh0 saved them.

* Admins can set project level permissions for users.   Per project, 
bugs are either hidden, readonly, or fully editable.   Since this logic
is new, please don't trust it 100% to prevent a malicious user from 
editing bugs they aren't supposed to.   There might still be holes. 

* btnet_console.exe and btnet_service.exe used to fail if the Subject
header came before the From headers.   Fixed.

-----------------------------------------------------------------------
Migrating 1.7.0
-----------------------------------------------------------------------

	alter table queries add qu_user int null
	alter table project_user_xref add pu_permission_level int default(2)

-----------------------------------------------------------------------
Version 1.6.9 11/12/2003
-----------------------------------------------------------------------

* see note below on how to migrate to this version.

* !!!! IMPORTANT !!!!
delete_bug was completely broken in 1.6.8 but even worse, before that
it was deleting the wrong stuff - like potentially a comment belonging
not to the bug being deleted but to another bug.   Fixed in this version

The sql used to say:
		sql = @"delete from bug_comments where bc_id = $1
			delete from bug_attachments where ba_id = $1
			delete from bug_subscriptions where bs_bug = $1
			delete from bugs where bg_id = $1";
Now it says:
		sql = @"delete from bug_comments where bc_bug = $1
			delete from bug_attachments where ba_bug = $1
			delete from bug_subscriptions where bs_bug = $1
			delete from bugs where bg_id = $1";


* A while back I made some columns bigger in setup.sql.   You might want
to do the same, but you don't have to.  Here's the SQL:

alter table bug_comments alter column bc_comment varchar(7000)
alter table bug_comments alter column bc_email_from varchar(255)
alter table queries alter column qu_sql varchar(7000)

* view_web_config.aspx was broken.  Fixed now.

* New "WindowsAuthentication" setting in Web.config.  See instructions
in web.config on how to avoid receiving a logon prompt.

* Receiving too many emails? Users can decide to receive only email 
notifications on new bugs, rather than receiving a change every time a
bug is changed. 

-----------------------------------------------------------------------
Migrating to 1.6.9 
-----------------------------------------------------------------------

Run this sql:

alter table users add us_only_new_bug_notifications int null default(0)
update users set us_only_new_bug_notifications = 0

-----------------------------------------------------------------------
Version 1.6.8 11/10/2003
-----------------------------------------------------------------------

SEE "MIGRATING TO 1.6.8" BELOW

I'm trying to make 51aspx.com more secure, suitable for a public
web server.   I think at this point, it is secure from mischief from
unauthorized or non-admin users.   Admin users can pretty much do
whatever they want, so don't grant admin rights to somebody you don't
know and trust.

* Revised logon scheme.  Before the browser carried cookies that
indicated whether the user was authenticated and an admin user.   These
were simple cookies, easy to forge.   Now cookie is a guid that must
match up with an entry in the new "sessions" table.  

* Revised search.aspx so that it does NOT run the sql sent to it in
the HTTP request but instead reassembles it based on the contents of
the controls.

* Revised query.aspx so that IF there is a users table (i.e, post
installation), it will require that a user be authenticated and
admin.   The idea is to let anybody use it before installation, but
after installation only admins.

* Now calling HttpUtility.HtmlDecode for values from textareas before
storing them in the database.   I hope this doesn't break anything for 
you.    The intent is that when the subject or body contains html tags,
those tags should be stored in the database as written.   However, when
echoed back in the web pages, the text from the db should be Html 
encoded to prevent cross-site-scripting problems.  I think btnet is
safe from cross-site-scripting attacks from non-admin users.

* Fixed broken AllowQueryEditingForNonAdmins setting.   Web.config now
sets it to off by default.  Keep this turned off on a public web server.

* New "CommentSortOrder" in Web.config - set to either "asc" or "desc"
to control sort order of comments and history.

* New "Send Email" link from edit_bug.aspx to send_email.aspx.

-----------------------------------------------------------------------
Migrating 1.6.8  
-----------------------------------------------------------------------

Run this:

create table sessions
(
	se_id char(37) not null,
	se_date datetime not null default(getdate()),
	se_user int not null
)

-----------------------------------------------------------------------
Version 1.6.7  11/06/2003
-----------------------------------------------------------------------

!!PLEASE SET THE NEW "AbsoluteUrlPrefix" VALUE IN Web.config!!   

You need to configure it for the bug-to-bug hyper links to work.

* Email notifications now contain hyperlinks

* A bunch of little bug fixes.

* Minor cosmetic improvements


-----------------------------------------------------------------------
Version 1.6.6 11/02/2003
-----------------------------------------------------------------------

* You can save shortcuts and links to bugs.   When you click on link,
if you are not logged in, you will be presented with the logon page, 
default.aspx.    After logging in you will be redirected to the link.

* Quickly switch queries on bug page using new drop down

* Better, safer handling of user-entered text used to build SQL 
statements

-----------------------------------------------------------------------
Version 1.6.5 11/01/2003
-----------------------------------------------------------------------

Many thanks to Eugene Kalinin (http://sourceforge.net/users/ekalinin/)
for his input on this release.

* Now able to search on user defined attribute and last updated

* User defined attribute shows up in search results and in notification
email

* "Prev" and "next" links on edit_bug.aspx for navigating through list
of bugs without returning to the list.   

* Notification emails are now in Html format and include everything
you would see on the "print" page.

* Bug comments textarea is bigger for new bugs

* If you add a new bug, and then another, the project is initialized
to the previously used project.

* Logging now actually logs something: url, who the user is, and all the
sql.

* Added SmtpSendUsing setting in Web.config.  See below in the tips
section to see how the Web.config settings are used to configure email
messages.

* Fixed bug: btnet_service.exe, btnet_console.exe were not URL encoding
their request to insert_bug.aspx


-----------------------------------------------------------------------
Version 1.6.4 10/26/2003
-----------------------------------------------------------------------

* Automatically subscribe to bug notifications on a per-project basis.

* Added "settings" link.  Non-admin users can control their own user 
settings.

-----------------------------------------------------------------------
Migrating to 1.6.4
-----------------------------------------------------------------------

There is a new table.  To add the table to your database, logon, click 
on admin, click on run ad-hoc query, paste in the text below and submit.

create table project_user_xref
(
pu_id int identity not null,
pu_project int not null,
pu_user int not null,
pu_auto_subscribe int not null default(0)
)

create index pu_index_1 on project_user_xref (pu_project, pu_user)
create index pu_index_2 on project_user_xref (pu_user, pu_project)


-----------------------------------------------------------------------
Version 1.6.3 10/22/2003
-----------------------------------------------------------------------

* Search now searches comments too

* Added SmtpServerPickupDirectory setting in Web.config.   You probably
don't need it.

* Added InsertBugUrl setting in Web.Config - removed hard-coded 
127.0.0.1 URL from pop3 client


-----------------------------------------------------------------------
Version 1.6.2 10/03/2003
-----------------------------------------------------------------------

Various bug fixes, including:
* bug attachment links were not being displayed right in edit_bugs.aspx
* This README.TXT file said bc_type is a char(1) instead of a varchar(8)
* Dropdowns sometimes were not in any meaningful sort order

Also:
* Added line charts (in addition to pie and bar)

-----------------------------------------------------------------------
Version 1.6.1 09/21/2003
-----------------------------------------------------------------------

Added "reports.aspx".   It's a page that lists various summary reports
that you can view either as data or in pie or bar chart form.

Create your own reports by adding entries to the "reports" table.

* Renamed btnet_pop3.exe to btnet_console.exe.   There is also now
a version that runs as a service, btnet_service.exe.   See Tips
section below for how to setup up btnet_service.exe.

-----------------------------------------------------------------------
Migrating to 1.6.1
-----------------------------------------------------------------------

Run the following SQL

create table reports
(
	rp_id int identity not null,
	rp_desc varchar(80) not null,
	rp_sql varchar(1024) not null,
	rp_chart_type varchar(8) not null
)


insert into reports (rp_desc, rp_sql, rp_chart_type)
values('Bugs by Status',
'select st_name [status], count(1) [count] from bugs inner join statuses on bg_status = st_id group by st_name order by st_name',
'pie')

insert into reports (rp_desc, rp_sql, rp_chart_type)
values('Bugs by Priority',
'select pr_name [priority], count(1) [count] from bugs inner join priorities on bg_priority = pr_id group by pr_name order by pr_name',
'pie')

insert into reports (rp_desc, rp_sql, rp_chart_type)
values('Bugs by Category',
'select ct_name [category], count(1) [count] from bugs inner join categories on bg_category = ct_id group by ct_name order by ct_name',
'pie')

insert into reports (rp_desc, rp_sql, rp_chart_type)
values('Bugs by Month',
'select month(bg_reported_date) [month], count(1) [count] from bugs group by year(bg_reported_date), month(bg_reported_date) order by year(bg_reported_date), month(bg_reported_date)',
'bar')

insert into reports (rp_desc, rp_sql, rp_chart_type)
values('Bugs by Day of Year',
'select datepart(dy, bg_reported_date) [day of year], count(1) [count] from bugs group by datepart(dy, bg_reported_date), datepart(dy,bg_reported_date) order by 1',
'bar')

insert into reports (rp_desc, rp_sql, rp_chart_type)
values('Bugs by User',
'select bg_reported_user, count(1) [r] into #t from bugs group by bg_reported_user; select bg_assigned_to_user, count(1) [a] into #t2 from bugs group by bg_assigned_to_user; select us_username, r [reported], a [assigned] from users left outer join #t on bg_reported_user = us_id left outer join #t2 on bg_assigned_to_user = us_id order by 1', 
'table')


-----------------------------------------------------------------------
Version 1.6
-----------------------------------------------------------------------

* Added btnet_pop3.exe.  It's a POP3 client that fetches emails and
stuffs them in the database as bugs.  See "Tips" section below for more
info.

* BUG_HISTORY has been merged into BUG_COMMENTS.  See "Migrating to 1.6"
section below.

* Improved SMTP support - now able to specify a user/password for SMTP
servers that require authentication.   See in Web.config:
<add key="SmtpServerAuthenticateUser" value="YOUR SMTP USER NAME"/>
<add key="SmtpServerAuthenticatePassword" value="YOUR PASSWORD"/>

* Got rid of Authenticate.dll scheme.

* Fixed bug where notification emails had incorrect bug status, category,
project, etc. 

* Fixed bug where edit_user.aspx died with names like O'Hara, O'Malley.


-----------------------------------------------------------------------
Migrating to 1.6
-----------------------------------------------------------------------


1) There are new columns in the project table and bug_comments table.   To add the columns to
your database, logon, click on admin, click on run ad-hoc query, paste 
in the text below and submit.

alter table projects add pj_enable_pop3 int null 
alter table projects add pj_pop3_username varchar(50) null
alter table projects add pj_pop3_password varchar(20) null
alter table projects add pj_pop3_email_from varchar(50) null

alter table bug_comments add bc_email_from varchar(255) null
alter table bug_comments add bc_email_to varchar(255) null
alter table bug_comments add bc_type varchar(8) null

2) Bug comment and bug history tables have been merged into one
table and a bc_type field now distinguishes them.  The types are:
comment
update
received [email]
sent [email]

The following SQL updates the bug_comment -- copy data from history to comments and get rid of history table

update bug_comments set bc_type = 'comment'

insert into bug_comments 
(bc_bug, bc_user, bc_date, bc_comment, bc_type)
select bh_bug, bh_user, bh_date, bh_what, 'update'
from bug_history

drop table bug_history


2) Update the top of your Web.config file, so that it looks like this:

<configSections>
	<section
		name="btnetSettings"
		type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" />
	<section
		name="pop3Settings"
		type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>


3) Add this after the line containing "</btnetSettings>".  Change the
actual settings to fit your situation.

	<pop3Settings>
		<!--
			Replace my server with YOUR server.
		-->
		<add key="Pop3Server" value="pop.sbcglobal.yahoo.com"/>

		<!--
			51aspx.com username, password that btnet_service.exe will use
			to talk to 51aspx.com
		-->
		<add key="username" value="email"/>
		<add key="password" value="x"/>

		<!--
			Only retrieve messages if they contain a magic word in their subject.
			If the value is blank, then btnet_pop3.exe will retrieve all messages.
			Probably for your production, the value should be blank.
		-->
		<add key="SubjectMustContain" value="test"/>
		<!--
			For my own testing, it was useful to have this option.
			For production the value should be 1.
		-->
		<add key="DeleteMessagesOnServer" value="1"/>

		<!--
			How frequently should btnet_pop3.exe check the server for emails?
		-->
		<add key="FetchIntervalInMinutes" value="15"/>

	</pop3Settings>
 
-----------------------------------------------------------------------
Version 1.5.1
-----------------------------------------------------------------------

* Added view_web_config.aspx to view Web.config file for admins
* Added ability to delete bugs
* Web.config gives more control over what non-admins are allowed
to do.  
* Web.config controls whether raw SQL displays on the query and search
pages
* Web.config controls whether bug change history entries are show with
bug comment entries or seperately

-----------------------------------------------------------------------
Version 1.5
-----------------------------------------------------------------------

Migrating from 1.4 to 1.5


There are new columns in the project table.   To add the columns to
your database, logon, click on admin, click on run ad-hoc query, paste 
in the text below and submit.

alter table projects add pj_default_user int null
alter table projects add pj_auto_assign_default_user int null
alter table projects add pj_auto_subscribe_default_user int null


-----------------------------------------------------------------------
Version 1.4
-----------------------------------------------------------------------

* New print bug feature
* Revised database access layer to - was architected all wrong.  You
shouldn't even use versions prior to 1.4 anymore.  Sorry.


