<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to share-your-stuff</title><link href="https://sourceforge.net/p/btnet/share-your-stuff/" rel="alternate"/><link href="https://sourceforge.net/p/btnet/share-your-stuff/feed.atom" rel="self"/><id>https://sourceforge.net/p/btnet/share-your-stuff/</id><updated>2012-10-08T17:46:17Z</updated><subtitle>Recent changes to share-your-stuff</subtitle><entry><title>Make configurable limit of results of "seach text" query</title><link href="https://sourceforge.net/p/btnet/share-your-stuff/35/" rel="alternate"/><published>2012-10-08T17:46:17Z</published><updated>2012-10-08T17:46:17Z</updated><author><name>Daniel Lipovetsky</name><uri>https://sourceforge.net/u/dlipovetsky/</uri></author><id>https://sourceforge.net2a829c55851f50aeaf9ecb54d9ced3ce49c4c7d7</id><summary type="html">We found that the hard-coded limit of 100 to results of a "search text" query was too small, so I made it configurable via Web.config.
Daniel</summary></entry><entry><title>edit_bug.aspx CODE BEHIND  (cbmod11c) - configurable</title><link href="https://sourceforge.net/p/btnet/share-your-stuff/34/" rel="alternate"/><published>2011-05-02T22:14:51Z</published><updated>2011-05-02T22:14:51Z</updated><author><name>polarlightning</name><uri>https://sourceforge.net/u/polarlightning/</uri></author><id>https://sourceforge.netcaa4a65dee717f4d969a3ef08f3f1103b4c5ca7b</id><summary type="html">\- here is the first preview of polished CODE BEHIND evolution file patch. 
\- you apply this patch over the clean Bugtracker.net 3\_4\_9 directory structure \(back up your files first, if you have modied something\)
\- with this patch you will get:
\* code behind version of edit\_bug.aspx  \(includes new edit\_bug.aspx and edit\_bug.aspx.cs\)
\* a little bit modified item edit form \(edit\_bug.aspx\) layout \(bigger ID-number: idea source Fogbugz\) and custom 
\- for example category specific - help text  support \(see aspx for explanation\). This layout needs a little 3-line fix
fix from the custom\btnet\_edit\_bug.css to set the field widths. Otherwise they were not fixed for some reason.
\* many CSS/HTML/XHTML standards compliancy improvements \(but I did not change ALL the possible links, just "a lot"\)
\* web.config configurable starting page \(the page where user lands right after login, if no explicit page was given\)
\* web.config configurable item edit page \(which is by default "edit\_bug.aspx"\)
\* web.config configurable item list page \(which is by default "bugs.aspx"\) 
\* more SUPPORT in workflow.cs to adjust edit form each time the page is reloaded from the server
and support for logging the main status changes with the workitem \(supports automatic time tracking for example\)
with example of table where to collect this data. Important changes principle: when assigned to person or status of 
the work changes. Note: this is just SUPPORT. You need to implement actual time counting from that table yourself
or wait as long as I get that module out as open source.
\- you may expext that I publish may be one or two more versions of this patch, but this is starting to be "about it".


</summary></entry><entry><title>further polished edit_bug.aspx - CODE BEHIND (cbmod11b)</title><link href="https://sourceforge.net/p/btnet/share-your-stuff/33/" rel="alternate"/><published>2011-04-27T17:34:12Z</published><updated>2011-04-27T17:34:12Z</updated><author><name>polarlightning</name><uri>https://sourceforge.net/u/polarlightning/</uri></author><id>https://sourceforge.netb32adcd86509b6146143dfa8c33cbff829627efe</id><summary type="html">Change codename:  CBMOD11B

In this chain I will update the NEXT STEPS -version of the originally posted CODE BEHIND edit\_bug.aspx 
\(posted 2011-04-12:  https://sourceforge.net/tracker/?func=detail&amp;aid=3285537&amp;group\_id=66812&amp;atid=1214931,
marked in the code with "CBMOD11"\).

The main update compared to the original "CBMOD11" changes post is that the Page\_Load "megafunction" has been
splitted into smaller functions. I also added quotes around some generated HTML to follow current recommendations.

Any testing feedback and improvements to the code are welcome.

</summary></entry><entry><title>prop.aspx - demo of code-behind BT.NET constructs</title><link href="https://sourceforge.net/p/btnet/share-your-stuff/32/" rel="alternate"/><published>2011-04-25T11:09:58Z</published><updated>2011-04-25T11:09:58Z</updated><author><name>polarlightning</name><uri>https://sourceforge.net/u/polarlightning/</uri></author><id>https://sourceforge.net13f6634d9d6d07dc9959d8839dca3cc9fef52072</id><summary type="html">NOTE: this tested with BT.NET version 3\_4\_9 but might work with earlier versions too.

Just a simple page, that displays the DataRow fields and values.  
This DataRow information is used by for example edit\_bug.aspx -form. 
It is also available in some App\_Code\workflow.cs functions. 

Just copy this to your www-folder. Go to edit some bug normally \(edit\_bug.aspx\) and
then change the "edit\_bug.aspx" into "prop.asp" and press enter -&amp;gt; You should see
all the fields and values of the datarow as a table.

I wrote this to help people to get started with developing new code behind pages
and this way to further accelerate world wide development of public codebase too
as more and more people are used to work with the code behind model.
</summary></entry><entry><title>CODE BEHIND -version of edit_bug.aspx (cbmod11)</title><link href="https://sourceforge.net/p/btnet/share-your-stuff/31/" rel="alternate"/><published>2011-04-12T21:59:38Z</published><updated>2011-04-12T21:59:38Z</updated><author><name>polarlightning</name><uri>https://sourceforge.net/u/polarlightning/</uri></author><id>https://sourceforge.netddedd855f9d0904446e6bd9bc20f091f6fb61183</id><summary type="html">hi folks,
It is not yet publishable, but I took the great step for the mankind and modifed the edit\_bug.aspx
page into separate aspx and aspx.cs -documents to follow the code behind -system.
I saw that as a way to allow more flexible custom developments with the page. 
At least our developers are asking for more shortcuts to all those dropdowns so that you could
more quickly create a work item of certain kind, to yourself in your current project etc.
I have some custom code included in the .cs, so before publishing, I would need
to make that more pluggable in that sense and also I still have a couple of code lines 
left in the aspx too \(but just a couple\). And, the edit\_bug.aspx -page base version that I am
using is 3.4.1 so that might need some updates too that i need to check out.
Let me hear if there is anybody interested in this. I just might get it out sooner.</summary></entry><entry><title>Auto-scubscribe users from custom fields</title><link href="https://sourceforge.net/p/btnet/share-your-stuff/30/" rel="alternate"/><published>2010-11-29T20:16:53Z</published><updated>2010-11-29T20:16:53Z</updated><author><name>Duane Collicott</name><uri>https://sourceforge.net/u/dcollicott/</uri></author><id>https://sourceforge.net3ea26c0da4690bc0345eb532081dc23830aba767</id><summary type="html">I have added two custom fields of type "user" \("Primary End User" and "Secondary End User"\) in which we can indicate the names of one or two end users who are the primary contacts for a bug. I wanted the users chosen in these fields to be automatically subscribed to the bug. to do this, I added a trigger on the users table.

Here's the text of the trigger:

CREATE TRIGGER trigAutosubscribeUsersToBug 
	ON bugs
	AFTER INSERT, UPDATE
AS 
BEGIN

set nocount on

declare @BugID int
declare @PrimaryEndUserID int
declare @SecondaryEndUserID int
declare @Exists int

\-- Get the bug id and the id's of the Primary and Secondary End Users.
select @BugID=bg\_id, @PrimaryEndUserID=\[Primary End User\], @SecondaryEndUserID=\[Secondary End User\] 
	from inserted

\-- Check to see if a Primary End User was selected.
if \(@PrimaryEndUserID &amp;lt;&amp;gt; 0\)
	begin
	\-- Make sure this user isn't already subscribed to this ticket.
	select @Exists = count\(\*\) from bug\_subscriptions where bs\_bug=@BugID and bs\_user=@PrimaryEndUserID
	if \(@Exists = 0\)
		\-- Do the subscribe.
		insert into bug\_subscriptions \(bs\_bug, bs\_user\) values \(@BugID, @PrimaryEndUserID\)
	end

\-- Check to see if a Secondary End User was selected.
if \(@SecondaryEndUserID &amp;lt;&amp;gt; 0\)
	begin
	\-- Make sure this user isn't already subscribed to this ticket.
	select @Exists = count\(\*\) from bug\_subscriptions where bs\_bug=@BugID and bs\_user=@SecondaryEndUserID
	if \(@Exists = 0\)
		\-- Do the subscribe.
		insert into bug\_subscriptions \(bs\_bug, bs\_user\) values \(@BugID, @SecondaryEndUserID\)
	end
end
</summary></entry><entry><title>Wiki plugin</title><link href="https://sourceforge.net/p/btnet/share-your-stuff/29/" rel="alternate"/><published>2010-07-18T14:02:21Z</published><updated>2010-07-18T14:02:21Z</updated><author><name>MarkW</name><uri>https://sourceforge.net/u/markw5/</uri></author><id>https://sourceforge.net098fa46e10b9ff22e6b495b22a8faa0403b2fdf7</id><summary type="html">\* wiki patch for bugtracker.net based on sample app from WikiPlex 1.2 \(http://wikiplex.codeplex.com/\)
\* copy the files and folders in btnet into the bugtracker root www folder
\* run the setup.sql to create the tables and help content wiki pages
\* Add &amp;lt;%@ Import Namespace="WikiPlex" %&amp;gt; to the top of Global.asax
\* Add the following line at the end of Application\_OnStart\(\) in Global.asax
	Macros.Register&amp;lt;Wiki.TitleLinkMacro&amp;gt;\(\);
\* Add a link to wiki.aspx using the CustomMenuLink items in web.config
\* bugtracker then needs to be running .NET 3.5. Web.config.net3\_5 contains a sample config.
Best to open the project and convert to 3.5 in Visual Studio</summary></entry><entry><title>Send Notifications by Exchange or SMTP GMail</title><link href="https://sourceforge.net/p/btnet/share-your-stuff/28/" rel="alternate"/><published>2010-06-08T16:52:38Z</published><updated>2010-06-08T16:52:38Z</updated><author><name>Oscar Adrian Gonzalez Gamboa</name><uri>https://sourceforge.net/u/manekineco/</uri></author><id>https://sourceforge.net8980ad366682f5508b337a116eb89a20bf5c9c05</id><summary type="html">I've been tried to send mails and configurate the notifications to users but i can't, how can do that? I'm useing the BugTracker in a LAN of my Job but configurations to use Gmail to send mails o notifications fails, I say...well, if i can't use Gmail SMTP why not use the internal Exchange Server but i tried everything and nothing..please in need help to solve this problem becouse use notifications are essential to informate to users for a new bug or change.</summary></entry><entry><title>Preselect the project and category in the URL</title><link href="https://sourceforge.net/p/btnet/share-your-stuff/27/" rel="alternate"/><published>2010-01-29T18:49:18Z</published><updated>2010-01-29T18:49:18Z</updated><author><name>Duane Collicott</name><uri>https://sourceforge.net/u/dcollicott/</uri></author><id>https://sourceforge.net191140f8d41bbd458aff29e0b80c1bee8b11f66e</id><summary type="html">Wanting to make it as easy as possible for my users to add a bug or feature request, I added the ability to specify the projectid and categoryid in the URL and have the drop down boxes automatically selected with the given values. I then add links in my applications containing these preselected values, which the user may click to easily report a bug or make a feature request.

For example: http://Intranet/BugTracker/edit\_bug.aspx?projectid=2&amp;categoryid=1

In the case of the project, I had to also add a foreach loop to walk the project dropdown box and select the item, just like the existing code does for several of the other dropdown boxes. In the case of the category, I simply added an if before the check for defaults. Therefore, for the way I implemented this, a category in the URL overrides a default. In either case, if the value is not given, is non-numeric, or a project or category with that id does not exist, it is simply ignored.

I have attached my code. I made changed in two locations, both marked with the, "Preselect."
</summary></entry><entry><title>Code for Exchange EWS support posted here</title><link href="https://sourceforge.net/p/btnet/share-your-stuff/26/" rel="alternate"/><published>2009-02-26T16:04:27Z</published><updated>2009-02-26T16:04:27Z</updated><author><name>Dworkin</name><uri>https://sourceforge.net/u/svasiliev/</uri></author><id>https://sourceforge.net10ecb166522b78f1cfaa4c61e6a48c644f87f3d2</id><summary type="html">Our internal task was to connect BTNet with MS Exchange 2007 with blocked POP3/IMAP. Another limitation was that we have only .Net 2 at our server. The only way to read e-mail from Exchange 2007 server was to use Exchange Web Services \(EWS\). 

So I did small modification of btnet\_service project
a. with the help of VS2008 I added web reference to our Exchange server
b. add new keys in config file
&amp;lt;\!-- 
Work with Exchange 2007 Web Services
\--&amp;gt;
&amp;lt;add key="UseEWS" value="1"/&amp;gt;
&amp;lt;add key="EWSFolder" value="c:\temp\EWS"/&amp;gt;
			
&amp;lt;\!--
The way, how e-mail shoud be deleted at the Exchange side
1 HardDelete
2 MoveToDeletedItems
3 SoftDelete
\--&amp;gt;
&amp;lt;add key="EWSDeleteType" value="2"/&amp;gt;

c. modified POP3Main::fetch\_messages\_for\_projects so that btnet\_service can use its internal functionality to have input from file \(see attachment\)
protected void fetch\_messages\_for\_projects\(\)
\{
	// Get the list of accounts to read
	try
	\{
		string sql = @"select
		pj\_id, pj\_pop3\_username, pj\_pop3\_password
		from projects
		where pj\_enable\_pop3 = 1";

		DataSet ds = get\_dataset\(sql\);

		foreach \(DataRow dr in ds.Tables\[0\].Rows\)
		\{

			if \(state \!= service\_state.STARTED\)
			\{
				break;
			\}


			write\_line\(string.Format\("processing project \{0\} using account \{1\}", Convert.ToString\(dr\["pj\_id"\]\), dr\["pj\_pop3\_username"\]\)\);

			if\(UseEWS == "1"\)
			\{
				EWS\_helper exchangeObj = new EWS\_helper\(\(string\) dr\["pj\_pop3\_username"\], \(string\) dr\["pj\_pop3\_password"\], EWSFolder, EWSDeleteType\);
				for \(int i = exchangeObj.InboxMailsNumber; i &amp;gt; 0; i = exchangeObj.InboxMailsNumber\)
				\{
					MessageInputFile = exchangeObj.GetEMLFile\(\);
					fetch\_messages\(\(string\)dr\["pj\_pop3\_username"\], \(string\)dr\["pj\_pop3\_password"\], \(int\)dr\["pj\_id"\]\);
					exchangeObj.DeleteLastProcessingEmail\(\);
					write\_line\("sending Exchange command DELETE ITEM"\);
				\}
			\}
			else
				fetch\_messages\(\(string\)dr\["pj\_pop3\_username"\], \(string\)dr\["pj\_pop3\_password"\], \(int\)dr\["pj\_id"\]\);
		\}
	\}
	catch \(Exception e\)
	\{
		write\_line\("Error trying to process messages"\);
		write\_line\(e\);
		return;
	\}
	
\}
d. add EWS\_helper.cs filoe to project to work with EWS \(see attachment\)

That's it. May be this will help someone to resolve the same problem.

Regards,
Sergey

</summary></entry></feed>