<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Suddenelfilio.net &#187; Web &amp; Design</title>
	<atom:link href="http://www.suddenelfilio.net/category/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.suddenelfilio.net</link>
	<description>Passionate about software development</description>
	<lastBuildDate>Mon, 19 Dec 2011 12:07:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Some Suddenelfilio.net changes.</title>
		<link>http://www.suddenelfilio.net/2010/09/11/some-suddenelfilio-net-changes/</link>
		<comments>http://www.suddenelfilio.net/2010/09/11/some-suddenelfilio-net-changes/#comments</comments>
		<pubDate>Sat, 11 Sep 2010 21:25:22 +0000</pubDate>
		<dc:creator>suddenelfilio</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Web & Design]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Disqus]]></category>
		<category><![CDATA[Support]]></category>
		<category><![CDATA[Zendesk]]></category>

		<guid isPermaLink="false">http://www.suddenelfilio.net/?p=543</guid>
		<description><![CDATA[As I mentioned earlier on this blog suddenelfilio.net now uses the Disqus Commenting &#38; Discussion system to handle comments on blogs. It is a really nice systems that integrates perfectly with WordPress on which this blog is running.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="Http://www.disqus.com"><img class="size-full wp-image-547 aligncenter" title="Http://www.disqus.com" src="http://www.suddenelfilio.net/wp-content/uploads/2010/09/dc-inline.png" alt="" width="191" height="22" /></a>As I mentioned earlier on this blog suddenelfilio.net now uses the<a href="http://disqus.com/comments/" target="_blank"> Disqus Commenting &amp; Discussion system</a> to handle comments on blogs. It is a really nice systems that integrates perfectly with WordPress on which this blog is running.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suddenelfilio.net/2010/09/11/some-suddenelfilio-net-changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connect to Facebook using ASP.NET, Facebook Graph API &amp; Hammock</title>
		<link>http://www.suddenelfilio.net/2010/09/08/connect-to-facebook-using-asp-net-facebook-graph-api-hammock/</link>
		<comments>http://www.suddenelfilio.net/2010/09/08/connect-to-facebook-using-asp-net-facebook-graph-api-hammock/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 10:53:45 +0000</pubDate>
		<dc:creator>suddenelfilio</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web & Design]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Codeplex]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Facebook Graph API]]></category>
		<category><![CDATA[hammock]]></category>

		<guid isPermaLink="false">http://www.suddenelfilio.net/?p=525</guid>
		<description><![CDATA[UPDATE: Hammock moved to github https://github.com/danielcrenna/hammock A while ago I wrote a post on how to perform oAuth authentication against the LinkedIn API using Hammock. Today I want to show you how to use Hammock with the Facebook Graph API. The Graph API is a new way a developer can read and write data to [...]]]></description>
			<content:encoded><![CDATA[<h2><b>UPDATE: Hammock moved to github https://github.com/danielcrenna/hammock</b></h2>
<p><img class="alignright size-full wp-image-433" title="hammock" src="http://www.suddenelfilio.net/wp-content/uploads/2010/08/hammock-logo.png" alt="" width="94" height="100" />A while ago I wrote a post on how to perform <a href="http://www.suddenelfilio.net/2010/08/24/linkedin-oauth-using-hammock-in-csharp-asp-net/" target="_blank">oAuth authentication against the LinkedIn API using Hammock</a>. Today I want to show you how to use <a href="http://hammock.codeplex.com" target="_blank">Hammock </a>with the <a href="http://developers.facebook.com/docs/api" target="_blank">Facebook Graph API</a>. The Graph API is a new way a developer can read and write data to Facebook. Facebook uses oAuth 2.0 which is a simpler version of the oAuth authentication I used in my previous article with LinkedIn. It uses SSL instead of relying on the URL signature schemes and token exchanges you see in oAuth 1.x</p>
<p>There are 3 steps:</p>
<ol>
<li>Redirect the visitor to the authorization page over at Facebook.com</li>
<li>Handle the callback from Facebook.com</li>
<li>Get an access_token from Facebook.com using the code parameter returned by Facebook.com in step 2</li>
</ol>
<p>For more information about the exact details on authorization in the Graph API go to: <a href="http://developers.facebook.com/docs/api">http://developers.facebook.com/docs/api</a></p>
<p>So let&#8217;s begin. I created a Web application in Visual Studio .Net 2010 that looks like this:</p>
<p><a href="http://www.suddenelfilio.net/wp-content/uploads/2010/09/begin.png"><img class="aligncenter size-medium wp-image-527" title="Sample start page" src="http://www.suddenelfilio.net/wp-content/uploads/2010/09/begin-300x176.png" alt="" width="300" height="176" /></a></p>
<p>As you can see there is not much on the page except for a button, an empty image and some text with &#8220;<em>Unknown</em>&#8221; values. The goal is that when your visitor clicks the &#8220;<em>Connect to Facebook</em>&#8221; button he/she gets redirect to Facebook.com to authorize your application and then you can get the profile picture, name and the visitor&#8217;s about text he/she filled in on Facebook.</p>
<p>When the visitor clicks the &#8220;<em>Connect to Facebook</em>&#8221; the following code is executed:</p>
<pre class="brush: csharp; title: ; wrap-lines: false; notranslate">

   protected void Button1_Click(object sender, EventArgs e)
   {
            string callbackUrl = &quot;http://localhost/FacebookConnectWithHammock/&quot;;
            //Request offline access and publish to the users stream access.
            Response.Redirect(string.Format(&quot;https://graph.facebook.com/oauth/authorize?client_id={0}&amp;redirect_uri={1}&amp;scope=offline_access,publish_stream&quot;, ConfigurationManager.AppSettings[&quot;FacebookClientId&quot;], callbackUrl));
   }
</pre>
<p>What this does is it will redirect the visitor to facebook to the authorization page. This specific authorization request asks foor &#8220;<em>offline_access</em>&#8221; and &#8220;<em>publish_stream</em>&#8221; rights. This means that the application can access your Facebook account while you are offline and it can also publish updates to your Facebook account. Other parameters are the &#8220;<em>client_id</em>&#8221; which you need to set to your application&#8217;s client id that was <a href="http://www.facebook.com/developers/apps.php#!/developers/" target="_blank">assigned to your application when you created it</a> and the &#8220;<em>redirect_uri</em>&#8221; which tells Facebook where to redirect the visitor after he/she granted your application access. When this is the first time the visitor is authorizing your application he/she will see the following authorization page:</p>
<p><a href="http://www.suddenelfilio.net/wp-content/uploads/2010/09/request.png"><img class="aligncenter size-medium wp-image-531" title="Facebook authorize application" src="http://www.suddenelfilio.net/wp-content/uploads/2010/09/request-300x144.png" alt="" width="300" height="144" /></a></p>
<p>When the visitors clicks on the &#8220;<em>Allow</em>&#8221; button Facebook will redirect the visitor back to the &#8220;<em>redirect_uri</em>&#8221; parameter. Then arriving on the web server we will receive a code parameter that we need to use to get the access_token. Here is how the callback code looks:</p>
<p>First in the Page_Load we check if the current request is a callback from Facebook by verifying if the <em>Request["code"] </em>querystring parameter is not null or empty and when it is not we call the callback handling code:</p>
<pre class="brush: csharp; title: ; wrap-lines: false; notranslate">

 protected void Page_Load(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(Request[&quot;code&quot;]) &amp;&amp; !Page.IsPostBack)
     {
          HandleFacebookCallback();
     }
 }
</pre>
<p>The HandleFacebookCallback method will use the &#8220;<em>code</em>&#8221; parameter to get an access token and then call the DisplayUserInformation method passing the received token. The DisplayUserInformation will make a request to the Graph API requesting information about the visitor that just authorized the application. It will show the profile picture, name of the visitor and the about text that is filled in on his/hers Facebook profile.</p>
<pre class="brush: csharp; title: ; wrap-lines: false; notranslate">

        private void HandleFacebookCallback()
        {
            string CallbackUrl = &quot;http://localhost/FacebookConnectWithHammock/&quot;;
            var client = new RestClient { Authority = &quot;https://graph.facebook.com/oauth/&quot; };
            var request = new RestRequest { Path = &quot;access_token&quot; };

            request.AddParameter(&quot;client_id&quot;, ConfigurationManager.AppSettings[&quot;FacebookClientId&quot;]);
            request.AddParameter(&quot;redirect_uri&quot;, CallbackUrl);
            request.AddParameter(&quot;client_secret&quot;, ConfigurationManager.AppSettings[&quot;FacebookApplicationSecret&quot;]);
            request.AddParameter(&quot;code&quot;, Request[&quot;code&quot;]);

            RestResponse response = client.Request(request);
            // A little helper to parse the querystrings.
            StringDictionary result = ParseQueryString(response.Content);
            string aToken = result[&quot;access_token&quot;];

            DisplayUserInformation(aToken);
        }

        private void DisplayUserInformation(string sToken)
        {
            var client = new RestClient { Authority = &quot;https://graph.facebook.com/&quot; };
            var request = new RestRequest { Path = &quot;me&quot; };
            request.AddParameter(&quot;access_token&quot;, sToken);
            RestResponse response = client.Request(request);

           JavaScriptSerializer ser = new JavaScriptSerializer();
            var parsedResult = ser.Deserialize&lt;FacebookUser&gt;(response.Content);

            ProfilePic.ImageUrl = string.Format(&quot;http://graph.facebook.com/{0}/picture?type=large&quot;,parsedResult.id);
            NameLabel.Text = parsedResult.name;
            AboutLabel.Text = parsedResult.about;
        }
</pre>
<p>When all goes well it should a little like the picture below.</p>
<p><a href="http://www.suddenelfilio.net/wp-content/uploads/2010/09/result.png"><img class="aligncenter size-medium wp-image-537" title="Result after authorization" src="http://www.suddenelfilio.net/wp-content/uploads/2010/09/result-300x176.png" alt="" width="300" height="176" /></a></p>
<p>Okay the formatting may not be optimal, but you get the point on how you can use <a href="http://hammock.codeplex.com" target="_blank">Hammock</a> to interact with the Facebook Graph API.</p>
<p>You can download the sample code here: <a  class='wpdm-popup' rel='colorbox'  title='FacebookConnectWithHammock.rar' href='http://www.suddenelfilio.net/?download=5' style="background:url('http://www.suddenelfilio.net/wp-content/plugins/download-manager/icon/download.png') no-repeat;padding:3px 12px 12px 28px;font:bold 10pt verdana;">Download</a><br><small style='margin-left:30px;'>Downloaded 1751 times</small></p>
<p><strong>NOTE:</strong> if you want to use the sample you will need to create an application first to get your application client id and secret. For more on this go to: <a href="http://www.facebook.com/developers/">http://www.facebook.com/developers/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.suddenelfilio.net/2010/09/08/connect-to-facebook-using-asp-net-facebook-graph-api-hammock/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Part 2: Using jQuery and Custom fields to rename the Fix Version/s field in Jira</title>
		<link>http://www.suddenelfilio.net/2010/09/07/part-2-using-jquery-and-custom-fields-to-rename-the-fix-versions-field-in-jira/</link>
		<comments>http://www.suddenelfilio.net/2010/09/07/part-2-using-jquery-and-custom-fields-to-rename-the-fix-versions-field-in-jira/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 11:05:55 +0000</pubDate>
		<dc:creator>suddenelfilio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web & Design]]></category>
		<category><![CDATA[Atlassian]]></category>
		<category><![CDATA[Custom Fields]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Jira]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.suddenelfilio.net/?p=516</guid>
		<description><![CDATA[Following up on my previous article on this topic I would like to show how using similar techniques you can rename the Fix Version/s field (analogue for the Afffected Version/s field) when creating, editing or viewing an issue. I&#8217;ve seen requests on the Jira Issue site for this, mostly because there are teams that are [...]]]></description>
			<content:encoded><![CDATA[<p>Following up on my <a href="http://www.suddenelfilio.net/2010/09/06/using-jquery-and-custom-fields-to-enforce-issue-type-security-in-jira/" target="_blank">previous article </a>on this topic I would like to show how using similar techniques you can rename the Fix Version/s field (analogue for the Afffected Version/s field) when creating, editing or viewing an issue. I&#8217;ve seen requests on the Jira Issue site for this, mostly because there are teams that are using Agile/scrum development and they want to rename the Version to Milestone, Sprint or just something else. Jira currently does not support this out-of-the-box unless you are willing to dive into the <a href="http://confluence.atlassian.com/display/JIRA/Customizing+text" target="_blank">localization jars and change those yourself</a>, which kind of a bummer since they do support agile development through the &#8211; in my opinion overpriced - <a href="http://www.atlassian.com/software/greenhopper/" target="_blank">Greenhopper </a>plugin.</p>
<p>Okay this is how the issue creation screen looks like without our little gimmick:</p>
<p><img class="aligncenter size-medium wp-image-518" title="Regular creation screen in jira" src="http://www.suddenelfilio.net/wp-content/uploads/2010/09/createwith-fix-version-300x209.png" alt="" width="300" height="209" /></p>
<p>I blacked out some values just for privacy reasons, but you get the point. Now if all you need is to change the text <em>Fix Version/s</em> to in our case <em>Milestone </em>all it takes is the following script:</p>
<pre class="brush: jscript; html-script: true; title: ; wrap-lines: false; notranslate">

&lt;script language=&quot;JavaScript&quot;&gt;

jQuery(function(){
	AJS.$(&quot;label[for=fixVersions]&quot;).replaceWith(&quot; &lt;label for='fixVersions'&gt;&lt;span class='required' title='Fields in italics are required'&gt;&lt;sup&gt;*&lt;/sup&gt;Milestone:&lt;/span&gt;&lt;/label&gt;&quot;);
});

&lt;/script&gt;
</pre>
<p>As you can see I&#8217;m using jQuery to look for a label element where the for attribute is set to &#8216;<em>fixVersions</em>&#8216; and replace it with a new label element.<br />
That&#8217;s all! Well not all, you still need to get it on your pages. To do this I&#8217;ve used a <strong>Message Custom Field (for edit)</strong>. If you also want this on your viewing page you need to create a second custom field of type <strong>Message Custom Field (for view)</strong> and set the default value of both custom fields to the script. To apply this text replacment to all screens, issue types and projects (create,edit and viewing) it&#8217;s best to set the context to &#8216;<em>Global</em>&#8216; and &#8216;<em>Any issue type</em>&#8216;. and you are good to go. When applied the screen screen will look like this:</p>
<p><a href="http://www.suddenelfilio.net/wp-content/uploads/2010/09/createwith-milestone.png"><img class="aligncenter size-medium wp-image-520" title="Create screen with text replacement" src="http://www.suddenelfilio.net/wp-content/uploads/2010/09/createwith-milestone-300x234.png" alt="" width="300" height="234" /></a></p>
<p>The Message Custom Field can be found in the <a href="https://studio.plugins.atlassian.com/wiki/display/JTOOL/JIRA+Toolkit+Plugin" target="_blank">Jira Toolkit plugin</a></p>
<p>Of course this technique can be applied to whatever field if you like, just remember it is a text replacement on rendering of the page so in the system nothing changes! If there is an error message about the Fix Version/s field for example when it is required and no version is selected the error message will not be using the term &#8216;<em>Milestone</em>&#8216;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suddenelfilio.net/2010/09/07/part-2-using-jquery-and-custom-fields-to-rename-the-fix-versions-field-in-jira/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using jQuery and Custom fields to enforce issue type security in Jira</title>
		<link>http://www.suddenelfilio.net/2010/09/06/using-jquery-and-custom-fields-to-enforce-issue-type-security-in-jira/</link>
		<comments>http://www.suddenelfilio.net/2010/09/06/using-jquery-and-custom-fields-to-enforce-issue-type-security-in-jira/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 22:30:12 +0000</pubDate>
		<dc:creator>suddenelfilio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web & Design]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Atlassian]]></category>
		<category><![CDATA[Custom Fields]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Issue]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Jira]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Velocity]]></category>

		<guid isPermaLink="false">http://www.suddenelfilio.net/?p=480</guid>
		<description><![CDATA[When working on our companies new issue tracking system I ran into the need to be able to prevent certain users or groups to create a specific type of issue. This however strange it may seem is not supported out-of-the-box  by Jira and browsing the Jira Issue site the nice people at Atlassian don&#8217;t seem [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-511" title="jquery" src="http://www.suddenelfilio.net/wp-content/uploads/2010/09/jquery.jpg" alt="" width="144" height="96" />When working on our companies new issue tracking system I ran into the need to be able to prevent certain users or groups to create a specific type of issue. This however strange it may seem is not supported out-of-the-box  by Jira and browsing the <a href="http://jira.atlassian.com/browse/JRA-5865" target="_blank">Jira Issue site</a> the nice people at Atlassian don&#8217;t seem to put high value in this much requested feature. Anyways looking at the comments in the issue I discovered that you can use a custom field called Velocity processed Custom Message Field (for edit) to use a mix of <a href="http://velocity.apache.org/" target="_blank">Apache Velocity templating</a> and javascript to do the trick. Okay it is a hack, but for now it is the only possibility out there that I&#8217;ve discovered.</p>
<p><img class="alignright size-medium wp-image-512" title="LOGOJIRA" src="http://www.suddenelfilio.net/wp-content/uploads/2010/09/LOGO_JIRA-300x155.png" alt="" width="180" height="93" />Now before you go looking for the custom field you have to know that is not installed by default.<a href="https://studio.plugins.atlassian.com/wiki/display/JTOOL/JIRA+Toolkit+Plugin;jsessionid=4C09C94BBC8F457DB70218D7B8EB94CB" target="_blank"> The Velocity processed Custom Message Field</a> can be found in a Jira plugin called<a href="https://plugins.atlassian.com/plugin/details/5142" target="_blank"> Jira Toolkit</a> over at the <a href="https://plugins.atlassian.com/search/by/jira" target="_blank">Plugin exchange</a>. So if you want this to work go and install this plugin.</p>
<p>Now with the plugin  installed create a new custom field of type Velocity processed Custom Message Field (for edit), give it a name and make sure you select All issue types and the global context! Don&#8217;t worry I&#8217;ll explain later why.</p>
<p style="text-align: center;"><a href="http://www.suddenelfilio.net/wp-content/uploads/2010/09/create-custom-field.png"></a><a href="http://www.suddenelfilio.net/wp-content/uploads/2010/09/create-custom-field.png"><img class="aligncenter size-large wp-image-486" title="Create custom field" src="http://www.suddenelfilio.net/wp-content/uploads/2010/09/create-custom-field-1024x755.png" alt="" width="614" height="453" /></a><br />
<a href="http://www.suddenelfilio.net/wp-content/uploads/2010/09/create-custom-field-2.png"><img class="aligncenter size-large wp-image-489" title="create custom field 2" src="http://www.suddenelfilio.net/wp-content/uploads/2010/09/create-custom-field-2-1024x756.png" alt="" width="614" height="454" /></a></p>
<p>Having created the custmom field it is time for the logic. What we are going to do is to create a mix of velocity script and javascript to show an error message to a user when he/she does not belongs to a certain user group and remove all the input fields from the form. The script I&#8217;m going to use for that looks as follows:</p>
<pre class="brush: jscript; title: ; wrap-lines: false; notranslate">

#if ($authcontext.user.inGroup('developers'))
##do nothing
#else

&lt;script language=&quot;JavaScript&quot;&gt;

jQuery(function ()
{
        AJS.$(&quot;&lt;div class='warningBox maxWidth' style='text-align:center;color:DarkRed'&gt;&lt;h1&gt;$authcontext.user.getFullName() ,&lt;br/&gt;This issue type is for internal use only. &lt;br/&gt;Please create an Incident, Enhancement or New Feature instead!&lt;/h1&gt;&lt;/div&gt;&quot;).appendTo('.intform');
	AJS.$(&quot;.jiraform&quot;).remove();
});

&amp;lt;/script&amp;gt;

#end
</pre>
<p>A little explenation is in order here I guess. All the lines preceded by the # sign is Velocity markup. Jira uses the Velocity templating engine to create its webpages. What the velocity code does is rather straight forward it checks if the current user is in the group &#8216;developers&#8217; -<em> $authcontext.user.inGroup(&#8216;developers&#8217;)</em> -. If that is the case then do nothing. When the current user is not in the &#8216;developers&#8217; user group a jQuery script will be executed which appends a div with a warning to the page and then removes the HTML table that contains all the input fields. A little note on this is that Jira must load the jQuery library. I found that my instance has got a line like this that load the jQuery library:</p>
<pre class="brush: xml; title: ; wrap-lines: false; notranslate">

&lt;script type=&quot;text/javascript&quot; src=&quot;/s/531/1/2.1.3/_/download/batch/com.atlassian.auiplugin:ajs/com.atlassian.auiplugin:ajs.js&quot; &gt;&lt;/script&gt;
</pre>
<p><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;"><br />
If you don&#8217;t have the jQuery library you need to make sure it is loaded.</span></p>
<p><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">So that is the script that will do the magic stuff. Now all you need to do is enter it as the default value for your custom field you created above. You can do this by clicking the &#8216;configure&#8217; link and on the new page &#8216;edit default value&#8217;. In the textbox paste the script and update the field.<br />
Remember that I said you needed to select all issue types and the global context when you created the custom field? The reason for that is that in Jira 4.1.x there seems to be an issue with setting the default value when you have not selected as is. When you select specific issue types and projects instead of all issue types and global context you&#8217;ll get strange page when you go and try to set the custom field&#8217;s default value. The textbox is not there. This is a known issue and the woirkaround for when you need to edit the default value is to set it back to all issue types and global context. I know that&#8217;s not really fun to do, but it will get it done! </span></p>
<p><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">Now to secure certain issue types you don&#8217;t want non developers to create just select the types you want and if necessary select the project(s). You can do this by clicking the &#8216;configure&#8217; link of the custom field and then select the &#8216;Edit configuration&#8217; option.</span></p>
<p><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">After you&#8217;ve saved these settings creating a prohibited issue type will render like this. What you see below is a customer trying to create a bug while a customer is only allowed to create an incident, New Feature or Enhancement </span></p>
<p style="text-align: center;"><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;"><a href="http://www.suddenelfilio.net/wp-content/uploads/2010/09/invalidissuetype.png"><img class="aligncenter size-large wp-image-505" title="Trying to create an invalid issue type" src="http://www.suddenelfilio.net/wp-content/uploads/2010/09/invalidissuetype-1024x292.png" alt="" width="614" height="175" /></a></span></p>
<p>As you can see you address the the user in this case Customer Person (which is the Fullname of the logged in jira user) that he/she can only create an Incident, Enhancement or New Feature. Also notice that there are no input fields on the form.</p>
<p>So depending on the version of jira you are using you will need to tweak the jQuery to show and remove the correct elements, but this should be applicable to any version where you can use the Velocity processed Custom Message Field.</p>
<p><strong>A small note I wish to add</strong> is that when a user disable javascipt in his/hers browser this solution will become useless since it uses javascript to disable those fields, but then again so becomes the rest of the internet just try and surf without javascript enabled <img src='http://www.suddenelfilio.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>In <a href="http://www.suddenelfilio.net/2010/09/07/part-2-using-jquery-and-custom-fields-to-rename-the-fix-versions-field-in-jira/" target="_self">part 2 I&#8217;ll show you how to change the label of the Version field</a> using similar techniques.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suddenelfilio.net/2010/09/06/using-jquery-and-custom-fields-to-enforce-issue-type-security-in-jira/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>LinkedIn OAuth using Hammock in C# &amp; ASP.NET</title>
		<link>http://www.suddenelfilio.net/2010/08/24/linkedin-oauth-using-hammock-in-csharp-asp-net/</link>
		<comments>http://www.suddenelfilio.net/2010/08/24/linkedin-oauth-using-hammock-in-csharp-asp-net/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 10:54:08 +0000</pubDate>
		<dc:creator>suddenelfilio</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Web & Design]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[hammock]]></category>
		<category><![CDATA[Linkedin]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[visual studio .net]]></category>
		<category><![CDATA[visual studio .net 2010]]></category>

		<guid isPermaLink="false">http://www.suddenelfilio.net/2010/08/24/linkedin-oauth-using-hammock/</guid>
		<description><![CDATA[UPDATE: Hammock moved to github https://github.com/danielcrenna/hammock &#160; Codeplex.com description of Hammock: Hammock is a REST library for .NET that greatly simplifies consuming and wrapping RESTful services. I’m currently working on a little web project that needed integration with LinkedIn.com. The LinkedIn API allows for OAuth authorization and authentication. They describe the process of getting a [...]]]></description>
			<content:encoded><![CDATA[<h2><b>UPDATE: Hammock moved to github https://github.com/danielcrenna/hammock</b></h2>
<blockquote><p><a href="http://hammock.codeplex.com"><img class="size-full wp-image-433 alignleft" style="margin-left: 10px; margin-right: 10px;" title="hammock" src="http://www.suddenelfilio.net/wp-content/uploads/2010/08/hammock-logo.png" alt="" width="94" height="100" /></a></p>
<p>&nbsp;</p>
<p><a href="http://hammock.codeplex.com" target="_blank">Codeplex.com</a> description of Hammock:<br />
Hammock is a REST library for .NET that greatly simplifies consuming and wrapping RESTful services.</p></blockquote>
<p><img class="size-full wp-image-435 alignright" style="margin-left: 15px; margin-right: 15px;" title="LinkedIn Logo" src="http://www.suddenelfilio.net/wp-content/uploads/2010/08/1282842190_linkedin.png" alt="" width="60" height="60" /></p>
<p>I’m currently working on a little web project that needed integration with <a href="http://www.linkedin.com" target="_blank">LinkedIn.com</a>. The <a href="http://developer.linkedin.com/docs/DOC-1008" target="_blank">LinkedIn API allows for OAuth</a> authorization and authentication. They describe the process of getting a request token, authorizing it by the user and then getting an access token. Standard <a href="http://oauth.net/" target="_blank">OAuth</a> you might say. So I needed a way to do this in C# and found the Hammock library. Although Hammock does not only do OAuth I used it for that purpose only at the moment.</p>
<p>Below is the code I wrote to get a request token and send the user to the authorization page at Linkedin:</p>
<pre class="brush: csharp; title: ; toolbar: true; wrap-lines: false; notranslate">

public void RequestAndAuthorize()
        {
            var credentials = new OAuthCredentials
            {
                CallbackUrl = &quot;http://127.0.0.1/oauth/callback/&quot;,
                ConsumerKey = ConfigurationManager.AppSettings[&quot;ConsumerKey&quot;],
                ConsumerSecret = ConfigurationManager.AppSettings[&quot;ConsumerSecret&quot;],
                Verifier = &quot;123456&quot;,
                Type = OAuthType.RequestToken
            };
            var client = new RestClient { Authority = &quot;https://api.linkedin.com/uas/oauth&quot;, Credentials = credentials };
            var request = new RestRequest { Path = &quot;requestToken&quot; };
            RestResponse response = client.Request(request);

            string token = response.Content.Split('&amp;amp;').Where(s =&amp;gt; s.StartsWith(&quot;oauth_token=&quot;)).Single().Split('=')[1];
            string token_secret = response.Content.Split('&amp;amp;').Where(s =&amp;gt; s.StartsWith(&quot;oauth_token_secret=&quot;)).Single().Split('=')[1];

            Response.Redirect(&quot;https://api.linkedin.com/uas/oauth?oauth_token=&quot; + token);
        }
</pre>
<p>Once the user has authorized your request token the LinkedIn server will redirect the user back to the callback url in this case this is http://127.0.0.1/oauth/callback. Using the returned oauth_token and oauth_token_secret (you got this one while requesting a request token) you can now get an access token so you can start making authenticated API calls from you application on behalf of the user.</p>
<p>This is the code that is used when the callback url is called:</p>
<pre class="brush: csharp; title: ; wrap-lines: false; notranslate">

	public void Callback()
        {
            var credentials = new OAuthCredentials
            {
                ConsumerKey = ConfigurationManager.AppSettings[&quot;ConsumerKey&quot;],
                ConsumerSecret = ConfigurationManager.AppSettings[&quot;ConsumerSecret&quot;],
                Token = token,
                TokenSecret = token_secret,
                Verifier = verifier,
                Type = OAuthType.AccessToken,
                ParameterHandling = OAuthParameterHandling.HttpAuthorizationHeader,
                SignatureMethod = OAuthSignatureMethod.HmacSha1,
                Version = &quot;1.0&quot;
            };
            var client = new RestClient { Authority = &quot;https://api.linkedin.com/uas/oauth&quot;, Credentials = credentials, Method = WebMethod.Post };
            var request = new RestRequest { Path = &quot;accessToken&quot; };
            RestResponse response = client.Request(request);
            string content = response.Content;
        }
</pre>
<p>As you can see Hammock is really nice and allows for easy OAuth authentication/authorization to be used.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suddenelfilio.net/2010/08/24/linkedin-oauth-using-hammock-in-csharp-asp-net/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>The new Suddenelfilio.net Logo</title>
		<link>http://www.suddenelfilio.net/2010/08/10/the-new-suddenelfilio-net-logo/</link>
		<comments>http://www.suddenelfilio.net/2010/08/10/the-new-suddenelfilio-net-logo/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 21:27:37 +0000</pubDate>
		<dc:creator>suddenelfilio</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Web & Design]]></category>
		<category><![CDATA[Logo]]></category>
		<category><![CDATA[Suddenelfilio.net]]></category>

		<guid isPermaLink="false">http://www.suddenelfilio.net/?p=414</guid>
		<description><![CDATA[The new logo: The new logo icon:]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: center;">The new logo:</h3>
<p><a href="http://www.suddenelfilio.net/wp-content/uploads/2010/08/Suddenelfilio_logo_v2.png"><img class="aligncenter size-full wp-image-415" title="Suddenelfilio_logo_v2" src="http://www.suddenelfilio.net/wp-content/uploads/2010/08/Suddenelfilio_logo_v2.png" alt="" width="297" height="73" /></a><a href="http://www.suddenelfilio.net/wp-content/uploads/2010/08/Logo_Icon.png"></a></p>
<h3 style="text-align: center;">The new logo icon:</h3>
<p><a href="http://www.suddenelfilio.net/wp-content/uploads/2010/08/Logo_Icon.png"><img class="aligncenter size-full wp-image-416" title="The Suddenelfilio.net Logo Icon" src="http://www.suddenelfilio.net/wp-content/uploads/2010/08/Logo_Icon.png" alt="" width="86" height="86" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.suddenelfilio.net/2010/08/10/the-new-suddenelfilio-net-logo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Increase Kooboo performance in IIS 7</title>
		<link>http://www.suddenelfilio.net/2010/08/10/increase-kooboo-performance-in-iis-7/</link>
		<comments>http://www.suddenelfilio.net/2010/08/10/increase-kooboo-performance-in-iis-7/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 16:00:10 +0000</pubDate>
		<dc:creator>suddenelfilio</dc:creator>
				<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[Visual Studio .Net]]></category>
		<category><![CDATA[Web & Design]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Kooboo]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[visual studio .net 2010]]></category>

		<guid isPermaLink="false">http://www.suddenelfilio.net/?p=408</guid>
		<description><![CDATA[Lately I&#8217;ve been working with the Kooboo CMS which is built using ASP.NET MVC. I really like the speed Kooboo allows you to build a website with dynamic content. All that fancy footwork comes with a downside. The first time you call a Kooboo application it is really and do mean REALLY slow to start. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.suddenelfilio.net/wp-content/uploads/2010/08/iis_logo.png"><img class="alignleft size-full wp-image-409" style="margin-left: 15px; margin-right: 15px;" title="iis_logo" src="http://www.suddenelfilio.net/wp-content/uploads/2010/08/iis_logo.png" alt="" width="123" height="63" /></a>Lately I&#8217;ve been working with the <a href="http://www.kooboo.com">Kooboo CMS</a> which is built using ASP.NET MVC. I really like the speed Kooboo allows you to build a website with dynamic content. All that fancy footwork comes with a downside. The first time you call a Kooboo application it is really and do mean REALLY slow to start. Cause? Well the Asp.net MVC framework, Microsoft Entity framework and most of all I think the extensive caching mechanism.</p>
<p><a href="http://www.suddenelfilio.net/wp-content/uploads/2010/08/kooboo_logo.png"><img class="alignright size-full wp-image-411" style="margin-left: 15px; margin-right: 15px;" title="kooboo_logo" src="http://www.suddenelfilio.net/wp-content/uploads/2010/08/kooboo_logo.png" alt="" width="127" height="24" /></a>I&#8217;ve experienced waiting times up till 30 seconds for the first page to appear, now this is not really acceptable for any site I admit. I remembered that there is IIS 7 extension called <a href="http://www.iis.net/download/applicationwarmup">application warm-up</a> tool that you can configure to call a certain url when the worker process recycles. This will trigger the site to startup again and load up all the caching and stuff. I&#8217;m not saying that the next call will be blazingly fast but at least your request will be served much faster.</p>
<p>I&#8217;m currently developing several sites using the Kooboo platform and I&#8217;m pleasently surprised of the possibilities of the platform. Thumbs up for the creators!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suddenelfilio.net/2010/08/10/increase-kooboo-performance-in-iis-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Suddenelfilio Products &amp; Services</title>
		<link>http://www.suddenelfilio.net/2010/06/21/suddenelfilio-products-services/</link>
		<comments>http://www.suddenelfilio.net/2010/06/21/suddenelfilio-products-services/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 10:49:36 +0000</pubDate>
		<dc:creator>suddenelfilio</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[MSTagLib]]></category>
		<category><![CDATA[Web & Design]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.suddenelfilio.net/?p=365</guid>
		<description><![CDATA[As of now Suddenelfilio.net is offering various products and services for those interested. Currently we offer 2 technology offers: 1. Microsoft Tag: suddenelfilio.net can help you with your Microsoft Tag needs. 2. WordPress Services: for a simple blog or wordpress as cms we can help you! Have a look at the Products &#38; Services page [...]]]></description>
			<content:encoded><![CDATA[<p>As of now Suddenelfilio.net is offering various products and services for those interested. Currently we offer 2 technology offers:</p>
<p>1. <strong>Microsoft Tag:</strong> suddenelfilio.net can help you with your Microsoft Tag needs.<br />
2. <strong>WordPress Services: </strong>for a simple blog or wordpress as cms we can help you!</p>
<p>Have a look at the <a href="http://www.suddenelfilio.net/products/">Products &amp; Services</a> page for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suddenelfilio.net/2010/06/21/suddenelfilio-products-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Release of Ril#</title>
		<link>http://www.suddenelfilio.net/2010/05/12/release-of-ril/</link>
		<comments>http://www.suddenelfilio.net/2010/05/12/release-of-ril/#comments</comments>
		<pubDate>Wed, 12 May 2010 15:26:49 +0000</pubDate>
		<dc:creator>suddenelfilio</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Web & Design]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[ReadItLater]]></category>

		<guid isPermaLink="false">http://www.suddenelfilio.net/?p=320</guid>
		<description><![CDATA[Today I released the website for my latest personal project, a .net library for the Read It Later Service API.  Through their api you can create your own client application. Using Ril# this is now easy to do in .net. Have a look at http://rilsharp.suddenelfilio.net]]></description>
			<content:encoded><![CDATA[<p><a href="http://rilsharp.suddenelfilio.net"><img class="alignright" title="rilsharp_logo" src="http://www.suddenelfilio.net/wp-content/uploads/2010/05/rilsharp_logo.png" alt="" width="150" height="150" /></a>Today I released the website for my latest personal project, a .net library for the <a href="http://www.readitlaterlist.com">Read It Later Service</a> API.  Through their api you can create your own client application. Using Ril# this is now easy to do in .net.</p>
<p>Have a look at <a href="http://rilsharp.suddenelfilio.net ">http://rilsharp.suddenelfilio.net </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.suddenelfilio.net/2010/05/12/release-of-ril/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MS Tag REST Certificate Issues</title>
		<link>http://www.suddenelfilio.net/2010/04/28/ms-tag-rest-certificate-issues/</link>
		<comments>http://www.suddenelfilio.net/2010/04/28/ms-tag-rest-certificate-issues/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 10:29:35 +0000</pubDate>
		<dc:creator>suddenelfilio</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[MSTagLib]]></category>
		<category><![CDATA[Web & Design]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Microsoft Tag]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://www.suddenelfilio.net/?p=311</guid>
		<description><![CDATA[This week I received an email telling me that they got an error while using the MS Tag REST  service: System.ServiceModel.Security.SecurityNegotiationException: Could not establish trust relationship for the SSL/TLS secure channel with authority &#8216;ws.tag.microsoft.com&#8216;. As you can see the authority is complaining about the Microsoft domain. The issue was the certificate used by Microsoft&#8217;s Tag [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.suddenelfilio.net/wp-content/uploads/2009/11/logo_whitebackground.jpg"><img class="alignright size-full wp-image-79" title="logo_whitebackground" src="http://www.suddenelfilio.net/wp-content/uploads/2009/11/logo_whitebackground.jpg" alt="" width="237" height="84" /></a>This week I received an email telling me that they got an error while using the MS Tag REST  service:</p>
<blockquote><p>System.ServiceModel.Security.SecurityNegotiationException: Could not establish trust relationship for the SSL/TLS secure channel with authority &#8216;<a href="http://ws.tag.microsoft.com/">ws.tag.microsoft.com</a>&#8216;.</p></blockquote>
<p>As you can see the authority is complaining about the Microsoft domain. The issue was the certificate used by Microsoft&#8217;s Tag API was outdated and thus the error was thrown when the  REST service communicated with the Microsoft service.</p>
<p>Since the certificate has been renewed and is now valid till somewhere early 2011 this problem should be resolved.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suddenelfilio.net/2010/04/28/ms-tag-rest-certificate-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

