<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Coding for Me]]></title><description><![CDATA[Thoughts, tips and ideas on all things tech and in my life.]]></description><link>https://justinalex.com/</link><image><url>https://justinalex.com/favicon.png</url><title>Coding for Me</title><link>https://justinalex.com/</link></image><generator>Ghost 3.16</generator><lastBuildDate>Sat, 21 Aug 2021 17:16:29 GMT</lastBuildDate><atom:link href="https://justinalex.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Android Q Beta: No Notifications for Hangouts Messages]]></title><description><![CDATA[Have Q Beta 3 and not getting any notifications from Hangouts? There is a new feature that you would need to configure in order for this to work.]]></description><link>https://justinalex.com/android-q-beta-no-notifications-for-hangouts-messages/</link><guid isPermaLink="false">5ec94294e381100001b6d4a6</guid><category><![CDATA[Android]]></category><category><![CDATA[Q Beta 3]]></category><dc:creator><![CDATA[Justin Alex Paramanandan]]></dc:creator><pubDate>Mon, 13 May 2019 02:15:18 GMT</pubDate><media:content url="https://justinalex.com/content/images/2019/05/Surprised-Hangouts.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://justinalex.com/content/images/2019/05/Surprised-Hangouts.png" alt="Android Q Beta: No Notifications for Hangouts Messages"><p><a href="https://developer.android.com/preview">Android Q</a> introduced a whole list of new features that provides a seamless user experience for users upgrading from Pie 9.0. Among them is a new feature called the <a href="https://www.androidpolice.com/2019/05/10/on-android-q-your-default-notification-assistant-app-can-manage-and-adjust-other-apps-notifications/">Notification Assistant</a>.</p>
<p>It is still work in progress (as of 13th May 2019, Q is still on Beta 3). If you're like me and use Hangouts, you will notice that you're not receiving any notifications from Hangouts messages sent to you. This doesn't happen with other messaging apps like WhatsApp, Telegram, SMS Messaging or Facebook Messenger.</p>
<p>After asking on <a href="https://www.reddit.com/r/android_beta/comments/bmx6qp/android_q_beta_3_no_notifications_from_hangouts/">Reddit</a>, I've managed to resolve this issue on my Pixel 2 XL.</p>
<blockquote>
<p>Image taken from <a href="https://www.androidpolice.com/2018/09/28/googles-hangouts-chrome-app-will-stop-working-soon/">Android Police</a>.</p>
</blockquote>
<h1 id="stepstoallownotifications">Steps to Allow Notifications</h1>
<ol>
<li>Go to <strong>Settings &gt; Apps &amp; notifications</strong></li>
<li>Then, tap on <strong>Notifications</strong>.</li>
<li>Under this section, disable the following options:
<ul>
<li><em>Automatic Notification Prioritizer</em></li>
<li><em>Hide silent notification status icons</em></li>
</ul>
</li>
</ol>
<p><img src="https://justinalex.com/content/images/2019/05/Screenshot_20190513-113720-1.png" alt="Android Q Beta: No Notifications for Hangouts Messages"></p>
<p>After this, your Hangouts notification should appear whenever you receive any new messages.</p>
<blockquote>
<p>Thanks to <a href="https://www.reddit.com/user/ysrzlkrnn">ysrzlkrnn</a> for providing the tips to fix this.</p>
</blockquote>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Ubuntu: Fixing the Apt Repository and Package Manager]]></title><description><![CDATA[Here's a guide to fixing the APT repository and package manager. This will fix any broken packages, which will stop you from upgrading your Ubuntu system.]]></description><link>https://justinalex.com/ubuntu-fixing-the-apt-repository-and-package-manager-2/</link><guid isPermaLink="false">5ec94294e381100001b6d4a3</guid><category><![CDATA[Ubuntu]]></category><dc:creator><![CDATA[Justin Alex Paramanandan]]></dc:creator><pubDate>Mon, 22 Jan 2018 02:59:59 GMT</pubDate><media:content url="https://justinalex.com/content/images/2018/01/taduuda-282823.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><h1 id="theerrormessages">The Error Messages</h1>
<img src="https://justinalex.com/content/images/2018/01/taduuda-282823.jpg" alt="Ubuntu: Fixing the Apt Repository and Package Manager"><p>For some reason, you are attempting to update Ubuntu through the command line like so:</p>
<pre><code class="language-bash">sudo apt-get upgrade
</code></pre>
<p>or via the Package Manager. But then you are getting the following errors (line 3 may be different for you, depending on the missing package):</p>
<pre><code class="language-bash">W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Malformed Status line, no 3rd word
E: Error occurred while processing libexiv2-11 (UsePackage3)
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened.
</code></pre>
<p>or maybe this (line 5 may be different for you, depending on the missing package):</p>
<pre><code class="language-bash">Reading package lists... Error!
E: Malformed Status line, no 3rd word
E: Error occurred while processing libexiv2-11 (UsePackage3)
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened
</code></pre>
<p>These messages affirm that the APT repository is indeed broken.</p>
<blockquote>
<p><em>Photo by <a href="https://unsplash.com/photos/vX_zk5yo7M4?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Taduuda</a> on <a href="https://unsplash.com/search/photos/computer?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></em></p>
</blockquote>
<hr>
<h1 id="fixingtheaptrepositoryandpackagemanager">Fixing the APT repository and Package Manager</h1>
<p>First off, clean the APT list which may be corrupted:</p>
<pre><code class="language-bash">sudo rm /var/lib/apt/lists/* -vf
</code></pre>
<p>Then, clean the Debian packaging modules:</p>
<pre><code class="language-bash">sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
</code></pre>
<p>And replace the bad packaging module with the previous, working one:</p>
<pre><code class="language-bash">sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
</code></pre>
<p>Update the repository:</p>
<pre><code class="language-bash">sudo apt-get update
</code></pre>
<p>By the end of this, your package manager and apt-repository should be fix and raring to go again!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Windows: Configure Environment Variables for Java]]></title><description><![CDATA[This is a guide to configure Windows PATH system variable for Java. After you've done this, you can start to execute Java commands from the Windows command line. You'll find these commands useful as you venture through the Java world.]]></description><link>https://justinalex.com/windows-configure-environment-variables-java/</link><guid isPermaLink="false">5ec94294e381100001b6d4a0</guid><category><![CDATA[Windows]]></category><category><![CDATA[Java]]></category><dc:creator><![CDATA[Justin Alex Paramanandan]]></dc:creator><pubDate>Sun, 05 Jun 2016 03:19:13 GMT</pubDate><media:content url="https://justinalex.com/content/images/2018/01/cover-1.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><h1 id="overview">Overview</h1>
<img src="https://justinalex.com/content/images/2018/01/cover-1.png" alt="Windows: Configure Environment Variables for Java"><p>We've written a post before on <a href="https://justinalex.com/ubuntu-install-oracle-java-jdk-8/">setting up Java on an Ubuntu or Debian box</a>. It was a rather straightforward process, and easy to set up (as long as you follow the steps one at a time).</p>
<p><img src="https://justinalex.com/content/images/2018/01/cover.png" alt="Windows: Configure Environment Variables for Java"></p>
<p>For Windows, the process is similar. For this guide, we'll be setting up the Java environment on the PATH system variable via the <strong>System Properties</strong>. In this guide, we'll be referring to Windows 10, but the same steps should work for other versions of Windows as well.</p>
<hr>
<h1 id="whatyoullneed">What You'll Need:</h1>
<ul>
<li><a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html">Oracle Java JDK/JRE</a> installed (latest version as of 5th June 2016 is Version 8 Update 91)</li>
<li>Windows 7/8/10 or Windows Server 2008/2012</li>
</ul>
<hr>
<h1 id="configurewindowspathsystemvariableforjava">Configure Windows PATH System Variable for Java</h1>
<ol>
<li>
<p>First off, open up the <strong>System Properties</strong> window by: - right-clicking on <strong>This PC</strong> and selecting <strong>Properties</strong></p>
<blockquote>
<p>you can also use the <em>Windows key + Pause</em> keyboard combo</p>
</blockquote>
<p><img src="https://justinalex.com/content/images/2018/01/01.png" alt="Windows: Configure Environment Variables for Java"></p>
</li>
<li>
<p>Next, choose <strong>Advanced system settings</strong>:<br>
<img src="https://justinalex.com/content/images/2018/01/02.png" alt="Windows: Configure Environment Variables for Java"></p>
</li>
<li>
<p>Then, choose <strong>Environment Variables</strong>:<br>
<img src="https://justinalex.com/content/images/2018/01/03.png" alt="Windows: Configure Environment Variables for Java"></p>
</li>
<li>
<p>You will then see two sections: <strong>User variables</strong> and <strong>System variables</strong>. We're going to configure the Java executables to the PATH system variable.</p>
</li>
<li>
<p>Now, click on <strong>New</strong> under the <strong>System variables</strong> section (highlighted above). In the next screen that follow, add the following entry:<br>
<img src="https://justinalex.com/content/images/2018/01/04.png" alt="Windows: Configure Environment Variables for Java"></p>
</li>
<li>
<p>Click <strong>OK</strong>. The <code>JAVA_HOME</code> variable is now saved under the <strong>System variables</strong> section.</p>
</li>
<li>
<p>We're halfway there. Now, we're going to reference the <code>JAVA_HOME</code> variable with the Java executables. Under the list of <strong>System variables</strong>, look for the PATH variable, and then <strong>Edit</strong>:<br>
<img src="https://justinalex.com/content/images/2018/01/05.png" alt="Windows: Configure Environment Variables for Java"></p>
</li>
<li>
<p>You'll then be presented with a list of PATH values. These paths come from either installed applications, or ones that are set by Microsoft. When any directory gets passed here, only then their commands can be used in a command line interface. Click on <strong>New</strong>:<br>
<img src="https://justinalex.com/content/images/2018/01/06.png" alt="Windows: Configure Environment Variables for Java"></p>
</li>
<li>
<p>You'll be then prompted with an empty box for data input. Enter the following: <code>%JAVA_HOME%bin</code><br>
<img src="https://justinalex.com/content/images/2018/01/07.png" alt="Windows: Configure Environment Variables for Java"></p>
</li>
<li>
<p>Click <strong>OK</strong> three times, until the <strong>Advanced system settings</strong> windows goes away.</p>
</li>
<li>
<p>Now you can test out the PATH system variable update for Java:</p>
<pre><code class="language-powershell">Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.

C:\Users\jusuc&gt;java -version
java version &quot;1.8.0_91&quot;
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
</code></pre>
</li>
</ol>
<p>Pat yourself in the back! You've just configure Windows PATH System Variable for Java, and you can begin executing Java commands from the command line.</p>
<hr>
<h1 id="extrathoughts">Extra Thoughts</h1>
<p>As you may have noticed, we've used the <code>%JAVA_HOME%</code> environment variable to reference the location of the Java executables. By configuring this way, you can just simply update the <code>%JAVA_HOME%</code> without worries. Once done, you will then execute future updated Java commands from the command line.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Bitbucket: Port Forward SSH Port 22]]></title><description><![CDATA[Port forward SSH port 22 for Bitbucket Server, and never need to enter a port number whenever you push your changes to a repository.]]></description><link>https://justinalex.com/bitbucket-port-forward-ssh-port-22/</link><guid isPermaLink="false">5ec94294e381100001b6d49d</guid><category><![CDATA[Bitbucket]]></category><category><![CDATA[Atlassian]]></category><dc:creator><![CDATA[Justin Alex Paramanandan]]></dc:creator><pubDate>Wed, 02 Dec 2015 13:23:33 GMT</pubDate><media:content url="https://justinalex.com/content/images/2018/01/glenn-carstens-peters-203007.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><h1 id="problem">Problem</h1>
<img src="https://justinalex.com/content/images/2018/01/glenn-carstens-peters-203007.jpg" alt="Bitbucket: Port Forward SSH Port 22"><p>If you attempt to clone a Bitbucket Server repository on SSH, you might stump into this problem:</p>
<pre><code class="language-powershell">D:\Documents\repos&gt;git clone ssh://git@localhost/test/test-repo.git
Cloning into 'test-repo'...
ssh: connect to host localhost port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.
</code></pre>
<blockquote>
<p><em>Cover Photo by <a href="https://unsplash.com/photos/npxXWgQ33ZQ?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Glenn Carstens-Peters</a> on <a href="https://unsplash.com/search/photos/computer?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></em></p>
</blockquote>
<hr>
<h1 id="explanation">Explanation</h1>
<p>Bitbucket Server listens for SSH connections on port 7999 by default.</p>
<p>Your users will need to include the port in the URL they use to clone from Bitbucket Server, for example:</p>
<pre><code class="language-powershell">git clone ssh://git@localhost:7999/test/test-repo.git`
</code></pre>
<p>Rather than have the port number in the URL, you may wish to set up port forwarding so that connections to the default SSH port are forwarded to the port Bitbucket Server is listening on (e.g. you could forward port 22 to port 7999).</p>
<p>This would allow your users to use a URL without a port number in it, like this:</p>
<pre><code class="language-powershell">git clone ssh://git@localhost/test/test-repo.git`
</code></pre>
<p>This simple how-to will guide you on how to port forward the SSH port on a Linux or Windows environment.</p>
<h2 id="solutionforlinux">Solution for Linux</h2>
<p><a href="https://confluence.atlassian.com/bitbucketserver/setting-up-ssh-port-forwarding-776640364.html">Atlassian provided a document</a> on how to set up SSH port forwarding in Linux using <a href="http://haproxy.1wt.eu/">HAProxy</a>.</p>
<h2 id="solutionforwindows">Solution for Windows</h2>
<ol>
<li>Open the command line prompt in Administrator’s mode and check if there are any existing routes that might interfere, using the command below:<br>
<code>netsh interface portproxy show all</code></li>
<li>If no results are found, you can start to port forward the SSH port using the command below (you can identify Bitbucket's SSH port from <a href="http://res.cloudinary.com/jusuchin85/image/upload/v1502071355/bitbucket-ssh-01_vcu0vx.png">here</a>):<pre><code class="language-powershell">netsh interface portproxy add v4tov4 listenport=22 connectport=   &lt;BITBUCKET_SERVER_SSH_PORT&gt; connectaddress=&lt;BITBUCKET_SERVER_IP&gt;
</code></pre>
</li>
<li>Run the same command as step 1 to check the results of your port forwarding:<pre><code class="language-powershell">C:\WINDOWS\system32&gt;netsh interface portproxy show all

Listen on ipv4:             Connect to ipv4:

Address         Port        Address         Port
--------------- ----------  --------------- ----------
*               22          localhost       7999
</code></pre>
</li>
<li>Attempt to clone your repository once more:<pre><code class="language-powershell">D:\Documents\repos&gt;git clone ssh://git@localhost/test/test-repo.git
Cloning into 'test-repo'...
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is SHA256:jtrT+G9H9TPaZzcknnMsR8yJiK7PF0+xnYuNIxjRZuc.
Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'localhost' (RSA) to the list of known hosts.

Enter passphrase for key '/c/Users/jalex/.ssh/id_rsa':

&gt; warning: You appear to have cloned an empty repository.
&gt; Checking connectivity... done.
</code></pre>
</li>
</ol>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Gaming: Mirror's Edge PhysX Fix]]></title><description><![CDATA[This is a guide on Mirror's Edge PhysX fix, where you might experience sluggishness if you're using a Nvidia graphics card and enable Physx.]]></description><link>https://justinalex.com/gaming-mirrors-edge-physx-fix/</link><guid isPermaLink="false">5ec94294e381100001b6d49c</guid><category><![CDATA[Gaming]]></category><category><![CDATA[nVidia]]></category><dc:creator><![CDATA[Justin Alex Paramanandan]]></dc:creator><pubDate>Tue, 17 Nov 2015 10:23:17 GMT</pubDate><media:content url="https://justinalex.com/content/images/2018/01/151828-2.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://justinalex.com/content/images/2018/01/151828-2.jpg" alt="Gaming: Mirror's Edge PhysX Fix"><p><a href="http://store.steampowered.com/app/17410/">Mirror’s Edge</a> is a game developed in 2009. For a game this old, you should not have any issues when playing it on modern day systems with the PhysX engine turned on. However, if you were to max out all the graphical settings and turn on PhysX, you <strong>will</strong> experience extreme lag and frame-drops. This quick guide will show you how to fix the extreme lag, and enjoy the PhysX module that comes with Mirror’s Edge.</p>
<hr>
<h1 id="thephysxproblem">The PhysX Problem</h1>
<p>Mirror’s Edge comes with its own PhysX module files, but these files are outdated (back in 2009, mind you). Even though the latest PhysX modules are included in current nVidia drivers, the game will still use the older modules.</p>
<p>What you will see when you enable PhysX is the framerate drop when running through shattering glass:</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Yg400WZaPxM?rel=0" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe>
<hr>
<h1 id="thephysxfix">The PhysX Fix</h1>
<blockquote>
<p>Note that this fix would only apply for machines with nVidia graphics card installed. If you’re using an AMD graphics card, skip to the next section.</p>
</blockquote>
<blockquote>
<p>Remember, <strong>always backup</strong> any directories before you start off any changes. This will allow you to rollback your changes in case anything goes wrong along the way.</p>
</blockquote>
<p>What you can do to remedy this is to delete the following files from the Mirror’s Edge <code>Binaries</code> directory (from <code>C:\Program Files (x86)\Steam\steamapps\common\mirrors edge\Binaries</code>):</p>
<ul>
<li><code>PhysXLocal</code> directory</li>
<li><code>PhysXCore.dll</code></li>
<li><code>PhysXDevice.dll</code></li>
</ul>
<p>When you restart the game, you will notice no framerate drops but still experience the shattering glass and all PhysX have to offer!</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/dsBPQ8KGuAE" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe>
<p>When you delete the above files, the game will then utilise what is available in the system; which are the newer and more optimised PhysX modules that comes with the latest nVidia drivers.</p>
<hr>
<h1 id="whataboutgamerswithamdgraphicscards">What About Gamers with AMD Graphics Cards?</h1>
<p>Unfortunately, the PhysX engine is only compatible with nVidia graphics cards. So, for those on AMD graphics cards, you should <strong>disable</strong> the PhysX option in the graphics options within the game.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Jira + ScriptRunner: Update a Custom Field with Difference between Two Dates]]></title><description><![CDATA[Learn how to update a field with the difference between two dates in Jira, using a Groovy script on your workflow transitions.]]></description><link>https://justinalex.com/jira-scriptrunner-update-custom-field-difference-two-dates/</link><guid isPermaLink="false">5ec94294e381100001b6d49b</guid><category><![CDATA[Jira]]></category><category><![CDATA[Atlassian]]></category><category><![CDATA[ScriptRunner]]></category><dc:creator><![CDATA[Justin Alex Paramanandan]]></dc:creator><pubDate>Thu, 12 Nov 2015 17:43:00 GMT</pubDate><media:content url="https://justinalex.com/content/images/2018/01/photo-1511871893393-82e9c16b81e3.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://justinalex.com/content/images/2018/01/photo-1511871893393-82e9c16b81e3.jpg" alt="Jira + ScriptRunner: Update a Custom Field with Difference between Two Dates"><p>You have a start date and an end date within an issue in Jira. On some cases, you may want to capture the elapsed number of days between those two dates (to calculate effort to complete the task, for example). This guide uses ScriptRunner to calculate the elapsed days between any two dates and add that value into a custom field. You can then use this field in any of your reports.</p>
<p><em>Cover photo by <a href="https://unsplash.com/photos/9n1USijYJZ4?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">JESHOOTS.COM</a> on <a href="https://unsplash.com/search/photos/schedule?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></em></p>
<h1 id="prerequisites">Prerequisites</h1>
<ul>
<li>Information from Jira
<ul>
<li>The Jira workflow to embed the script</li>
<li>The custom field name and its option IDs</li>
<li>The Date Fields to be used for comparisons</li>
</ul>
</li>
<li><a href="https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner">ScriptRunner for Jira</a></li>
<li>Groovy script to execute</li>
</ul>
<hr>
<h1 id="scripttocalculateandupdatefieldwithdifferencebetweentwodates">Script to Calculate and Update Field with Difference between Two Dates</h1>
<p>You can grab the script from my repository here: <a href="https://bitbucket.org/jusuchin85-atlassian/jira-groovy-scripts/raw/master/jira-server/workflows/post-functions/ValidateTwoDatesWorkflow.groovy">ValidateTwoDatesWorkflow.groovy @ Bitbucket</a></p>
<hr>
<h1 id="configurationinjira">Configuration in Jira</h1>
<p>In the workflow for the project, I added a new <strong>Custom Script</strong> post function to the <em>Resolve Issue</em> transition:<br>
<img src="https://justinalex.com/content/images/2018/01/groovy-workflow-01_x97tve.png" alt="Jira + ScriptRunner: Update a Custom Field with Difference between Two Dates"></p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Jira + ScriptRunner: Automatically Close Issues After a Period of Time]]></title><description><![CDATA[Develop a script to automatically close issues in a certain status in Jira so that your reports remain accurate.]]></description><link>https://justinalex.com/jira-scriptrunner-automatically-close-issues-period-time/</link><guid isPermaLink="false">5ec94294e381100001b6d49a</guid><category><![CDATA[Jira]]></category><category><![CDATA[ScriptRunner]]></category><category><![CDATA[Atlassian]]></category><dc:creator><![CDATA[Justin Alex Paramanandan]]></dc:creator><pubDate>Fri, 25 Sep 2015 10:10:38 GMT</pubDate><media:content url="https://justinalex.com/content/images/2018/01/photo-1511816120351-e2d275a814e3.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://justinalex.com/content/images/2018/01/photo-1511816120351-e2d275a814e3.jpg" alt="Jira + ScriptRunner: Automatically Close Issues After a Period of Time"><p>There could be an opportunity for you to automatically close issues after a certain period of time in Jira. You could always use the <strong>Bulk Update</strong> mechanism to bulk transition these issues, or you could let a Groovy script execute that for you automatically (after a set period of time). Here's a script on how you can achieve this on your Jira instance.</p>
<blockquote>
<p><em>Cover Photo by <a href="https://unsplash.com/photos/E1SID6pKht8?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Craig Whitehead</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></em></p>
</blockquote>
<h1 id="prerequisites">Prerequisites</h1>
<ul>
<li>Information from Jira - Jira <strong>project(s)</strong></li>
<li><strong>Transition ID</strong> from Done to Closed</li>
<li><strong>Username</strong> that is able to execute the transition to Close</li>
<li><a href="https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner">ScriptRunner for Jira</a></li>
</ul>
<hr>
<h1 id="scripttouse">Script to Use</h1>
<blockquote>
<p>The script was from a <a href="https://productsupport.adaptavist.com/browse/SRJIRA-1227">Groovy ScriptRunner bug ticket</a> raised a few years ago. Thanks, Marcel!</p>
</blockquote>
<p>The script can be viewed on this page: <a href="https://bitbucket.org/jusuchin85-atlassian/jira-groovy-scripts/raw/master/jira-server/services/close-issues.groovy">close-issues.groovy @ Bitbucket</a></p>
<h2 id="wheretomakechanges">Where to make changes</h2>
<pre><code class="language-groovy">// Global variables to be updated before utilising the script
int daysSinceResolved = 5 ; // days to check for issue closure
int actionId = 701; // transition id from Done to Closed
String project = &quot;TEST, JIRA&quot;; // target project key. To include more than 1 project, include the project keys in quotes
String previousStatus = &quot;Done&quot;; // status to check before closing
String username = &quot;admin&quot;; // acting user who has the privilege to transition issues to Closed
String comment = &quot;Automatically closing issue since it has been resolved for ${daysSinceResolved} days.&quot;;
</code></pre>
<ul>
<li><code>daysSinceResolved</code>: number of days to check for closing issues.</li>
<li><code>actionId</code>: the transition ID from the Done status to Closed</li>
<li><code>project</code>: the project key(s) to fetch the issues to close</li>
<li><code>previousStatus</code>: the name of the status to check before closing</li>
<li><code>username</code>: the username of the user who can execute the transition from Done to Closed</li>
<li><code>comment</code>: the comment to add once the transition to Closed is complete</li>
</ul>
<hr>
<h1 id="stepstoimplementthescript">Steps to Implement the Script</h1>
<ol>
<li>Upload the Groovy script to the <code>$JIRA_HOME/scripts</code> directory.</li>
<li>Ensure that the Groovy script is in <code>755</code> permissions, and owned by <strong>the user who starts JIRA</strong>:<pre><code class="language-bash">sudo chown jira:jira close-issues.groovy &amp;&amp; chmod 755 close-issues.groovy
</code></pre>
</li>
<li>In JIRA, go to <strong>Administration &gt; Advanced &gt; Services</strong>.</li>
<li>Add a new Service, with the following information: - <strong>Name</strong>: an appropriate name for the service
<ul>
<li><strong>Class</strong>: <code>com.onresolve.jira.groovy.GroovyService</code></li>
<li><strong>Schedule:</strong> Days per Week (Saturday and Sunday) and set the time to execute the service</li>
</ul>
</li>
<li>Click <strong>Save</strong>.</li>
<li>Edit the newly created service to include the path of the Groovy script.</li>
<li>Click <strong>Update</strong>.</li>
</ol>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Jira: Audit User Actions via Access Logs]]></title><description><![CDATA[Investigate user actions using the access logs provided by Jira.]]></description><link>https://justinalex.com/jira-audit-user-actions-via-access-logs/</link><guid isPermaLink="false">5ec94294e381100001b6d499</guid><category><![CDATA[Jira]]></category><category><![CDATA[Atlassian]]></category><dc:creator><![CDATA[Justin Alex Paramanandan]]></dc:creator><pubDate>Sat, 03 Jan 2015 01:34:00 GMT</pubDate><media:content url="https://justinalex.com/content/images/2018/01/photo-1504355080015-bba52674577b.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://justinalex.com/content/images/2018/01/photo-1504355080015-bba52674577b.jpg" alt="Jira: Audit User Actions via Access Logs"><p>Jira doesn't come pre-build with information on who performed an action from the frontend. So, how can we find out who has updated a custom field that has impacted a lot of projects?</p>
<p>This is where the access logs come in, and Jira has this in the backend; running forever in the Tomcat Container.</p>
<blockquote>
<p>Jira 6.1 and above already has an <strong>Audit Log</strong> feature built into the environment. This blog post may not apply to these versions of Jira, unless you want to go deeper into the access logs. Read more all about the Audit Log here: <a href="https://confluence.atlassian.com/adminjiraserver/auditing-in-jira-applications-938847740.html">Auditing in Jira applications</a></p>
</blockquote>
<p><em>Cover photo by <a href="https://unsplash.com/photos/vpR0oc4X8Mk?utmsource=unsplash&amp;utmmedium=referral&amp;utmcontent=creditCopyText">Samuel Zeller</a> on <a href="https://unsplash.com/search/photos/document?utmsource=unsplash&amp;utmmedium=referral&amp;utmcontent=creditCopyText">Unsplash</a></em></p>
<h1 id="findoutthepagethatwasactionedupon">Find Out the Page that was Actioned Upon</h1>
<p>So, let's say someone has added default values to a custom field; and this has impacted a lot of projects utilising this field. A project manager wanted to know who did this so that he can educate that user on the impact of his/her action.</p>
<p>For this example, let's say the affected field is the <strong>On hold reason</strong> field. Let's grab the URL when we choose to configure the field:<br>
<img src="https://justinalex.com/content/images/2018/01/custom-field-id-url.png" alt="Jira: Audit User Actions via Access Logs"><br>
From the URL, deduce a unique identifier that distinguishes this custom field from the rest. Notice the red-boxed area in the screenshot above. Since we are finding a specific custom field change, grab the <code>customfield_id</code>:</p>
<pre><code>&amp;customFieldId=10323
</code></pre>
<hr>
<h1 id="grabtheinformationfromtheaccesslogs">Grab the Information from the Access Logs</h1>
<ol>
<li>
<p>We know the ID of the affected custom field, now let's find a list of users who has access this page before. Go to your <code>$JIRA_INSTALL/logs</code> directory and perform an <code>ls -lah access*</code>:</p>
<pre><code class="language-bash">ls -lah access*

-rw-rw-r-- 1 ec2-user ec2-user 2.8M Nov  2 00:00 access_log.2014-11-01
-rw-rw-r-- 1 ec2-user ec2-user 1.1M Nov  2 23:58 access_log.2014-11-02
-rw-rw-r-- 1 ec2-user ec2-user  40M Nov  3 23:59 access_log.2014-11-03
-rw-rw-r-- 1 ec2-user ec2-user  35M Nov  4 23:59 access_log.2014-11-04
-rw-rw-r-- 1 ec2-user ec2-user  34M Nov  5 23:59 access_log.2014-11-05
-rw-rw-r-- 1 ec2-user ec2-user  32M Nov  6 23:57 access_log.2014-11-06
-rw-rw-r-- 1 ec2-user ec2-user  30M Nov  7 23:59 access_log.2014-11-07
-rw-rw-r-- 1 ec2-user ec2-user 883K Nov  8 23:58 access_log.2014-11-08
-rw-rw-r-- 1 ec2-user ec2-user 733K Nov  9 23:58 access_log.2014-11-09
-rw-rw-r-- 1 ec2-user ec2-user  29M Nov 10 23:59 access_log.2014-11-10
-rw-rw-r-- 1 ec2-user ec2-user  43M Nov 11 23:58 access_log.2014-11-11
-rw-rw-r-- 1 ec2-user ec2-user  38M Nov 12 23:59 access_log.2014-11-12
-rw-rw-r-- 1 ec2-user ec2-user  33M Nov 13 23:58 access_log.2014-11-13
-rw-rw-r-- 1 ec2-user ec2-user  29M Nov 14 23:59 access_log.2014-11-14
-rw-rw-r-- 1 ec2-user ec2-user 2.1M Nov 15 23:57 access_log.2014-11-15
-rw-rw-r-- 1 ec2-user ec2-user 1.7M Nov 16 23:57 access_log.2014-11-16
-rw-rw-r-- 1 ec2-user ec2-user  32M Nov 17 23:56 access_log.2014-11-17
-rw-rw-r-- 1 ec2-user ec2-user  36M Nov 18 23:59 access_log.2014-11-18
-rw-rw-r-- 1 ec2-user ec2-user  32M Nov 19 23:59 access_log.2014-11-19
-rw-rw-r-- 1 ec2-user ec2-user  35M Nov 20 23:59 access_log.2014-11-20
-rw-rw-r-- 1 ec2-user ec2-user  26M Nov 21 23:58 access_log.2014-11-21
-rw-rw-r-- 1 ec2-user ec2-user 3.2M Nov 22 23:58 access_log.2014-11-22
-rw-rw-r-- 1 ec2-user ec2-user 1.9M Nov 23 23:58 access_log.2014-11-23
-rw-rw-r-- 1 ec2-user ec2-user  31M Nov 24 23:59 access_log.2014-11-24
-rw-rw-r-- 1 ec2-user ec2-user  37M Nov 25 23:59 access_log.2014-11-25
-rw-rw-r-- 1 ec2-user ec2-user  32M Nov 26 23:59 access_log.2014-11-26
-rw-rw-r-- 1 ec2-user ec2-user  38M Nov 27 23:58 access_log.2014-11-27
-rw-rw-r-- 1 ec2-user ec2-user  25M Nov 28 23:59 access_log.2014-11-28
-rw-rw-r-- 1 ec2-user ec2-user 781K Nov 29 23:57 access_log.2014-11-29
-rw-rw-r-- 1 ec2-user ec2-user 1.4M Nov 30 23:57 access_log.2014-11-30
-rw-rw-r-- 1 ec2-user ec2-user  36M Dec  1 23:59 access_log.2014-12-01
-rw-rw-r-- 1 ec2-user ec2-user  38M Dec  2 23:59 access_log.2014-12-02
-rw-rw-r-- 1 ec2-user ec2-user  38M Dec  3 23:57 access_log.2014-12-03
-rw-rw-r-- 1 ec2-user ec2-user  36M Dec  4 23:59 access_log.2014-12-04
-rw-rw-r-- 1 ec2-user ec2-user  32M Dec  6 00:00 access_log.2014-12-05
-rw-rw-r-- 1 ec2-user ec2-user 4.5M Dec  6 23:58 access_log.2014-12-06
-rw-rw-r-- 1 ec2-user ec2-user 1.7M Dec  7 23:59 access_log.2014-12-07
-rw-rw-r-- 1 ec2-user ec2-user  45M Dec  9 00:00 access_log.2014-12-08
-rw-rw-r-- 1 ec2-user ec2-user  39M Dec 10 00:00 access_log.2014-12-09
-rw-rw-r-- 1 ec2-user ec2-user  37M Dec 11 00:00 access_log.2014-12-10
-rw-rw-r-- 1 ec2-user ec2-user  29M Dec 11 23:59 access_log.2014-12-11
-rw-rw-r-- 1 ec2-user ec2-user  32M Dec 13 00:00 access_log.2014-12-12
-rw-rw-r-- 1 ec2-user ec2-user 3.1M Dec 13 23:59 access_log.2014-12-13
-rw-rw-r-- 1 ec2-user ec2-user 2.6M Dec 15 00:00 access_log.2014-12-14
-rw-rw-r-- 1 ec2-user ec2-user  38M Dec 15 23:59 access_log.2014-12-15
-rw-rw-r-- 1 ec2-user ec2-user  38M Dec 16 18:03 access_log.2014-12-16
</code></pre>
</li>
<li>
<p>From the command above, we found a lot of <code>access_log</code> files. Let's <code>grep</code> the above files for instances of the custom field that we are more interested in:</p>
<pre><code class="language-bash">less access* | grep '&amp;customFieldId=10323'

127.0.0.1 1340x3799190x1 tmahsun [14/Dec/2014:22:20:42 +1100] &quot;GET /secure/admin/ManageConfigurationScheme!default.jspa?atl_token=B14E-GL73-6FKZ-OP3B%7C1969712ab02334ed26991c8ca7a02224b2252db9%7Clin&amp;fieldConfigSchemeId=13913&amp;customFieldId=10323&amp;returnUrl=ConfigureCustomField%21default.jspa%3FcustomFieldId%3D10323 HTTP/1.1&quot; 200 101259 485 &quot;https://pinkie-jira.com.au/secure/admin/ConfigureCustomField!default.jspa?customFieldId=10323&quot; &quot;Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/7.0)&quot; &quot;flt8wy&quot;
127.0.0.1 1340x3799191x1 - [14/Dec/2014:22:20:42 +1100] &quot;GET /s/d41d8cd98f00b204e9800998ecf8427e/en_US135a92-1988229788/6262/55/ebda7fb1e8929bc87f332ce20a1ecfe0/_/download/contextbatch/js/atl.admin/batch.js?cache=false&amp;isAdmin=true&amp;supportedApplication=true HTTP/1.1&quot; 200 6840 5 &quot;https://pinkie-jira.com.au/secure/admin/ManageConfigurationScheme!default.jspa?atl_token=B14E-GL73-6FKZ-OP3B%7C1969712ab02334ed26991c8ca7a02224b2252db9%7Clin&amp;fieldConfigSchemeId=13913&amp;customFieldId=10323&amp;returnUrl=ConfigureCustomField%21default.jspa%3FcustomFieldId%3D10323&quot; &quot;Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/7.0)&quot; &quot;flt8wy&quot;
...
</code></pre>
</li>
<li>
<p>We can assume that the user <strong><em>tmahsun</em></strong> has perform edits in the custom field's default value, but that might not be the case. You may encounter a lot of lines from the command above, and that may exceed the limit of the terminal's buffer; so we may miss out a lot of other potential users as well. Let's output the command above to a file instead to grab all the information for investigation:</p>
<pre><code class="language-bash">less access* | grep '&amp;customFieldId=10323' &gt; cf-access
</code></pre>
</li>
<li>
<p>Now if we were to <code>less</code> the file <code>cf-access</code> file, we can narrow down the users who has accessed this page:</p>
<pre><code class="language-bash">less cf-access

127.0.0.1 1340x3799190x1 tmahsun [14/Dec/2014:22:20:42 +1100] &quot;GET /secure/admin/ManageConfigurationScheme!default.jspa?atl_token=B14E-GL73-6FKZ-OP3B%7C1969712ab02334ed26991c8ca7a02224b2252db9%7Clin&amp;fieldConfigSchemeId=13913&amp;customFieldId=10323&amp;returnUrl=ConfigureCustomField%21default.jspa%3FcustomFieldId%3D10323 HTTP/1.1&quot; 200 101259 485 &quot;https://pinkie-jira.com.au/secure/admin/ConfigureCustomField!default.jspa?customFieldId=10323&quot; &quot;Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/7.0)&quot; &quot;flt8wy&quot;
...
127.0.0.1 813x3906269x1 sysadmin [16/Dec/2014:13:33:51 +1100] &quot;GET /secure/admin/ConfigureCustomField!default.jspa?customFieldId=10323 HTTP/1.1&quot; 200 47363 438 &quot;https://pinkie-jira.com.au/secure/admin/EditCustomFieldDefaults!default.jspa?atl_token=B14E-GL73-6FKZ-OP3B%7C193d84aec30b4d9394e50b40923c29a944b7af5a%7Clin&amp;fieldConfigSchemeId=13913&amp;fieldConfigId=15413&amp;customFieldId=10323&amp;returnUrl=ConfigureCustomField%21default.jspa%3FcustomFieldId%3D10323&quot; &quot;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36&quot; &quot;pb0gye&quot;
</code></pre>
</li>
<li>
<p>Only with the <code>cf-access</code> file can we drill down who has updated the custom field's default value, and we can safely say that username <em>tmahsun</em> is the user we're after (only if we are the <em>sysadmin</em> user that updated the field based on the project manager's request).</p>
</li>
</ol>
<hr>
<h1 id="finalwords">Final Words</h1>
<p>With the above method, we can deduce almost all users' activities within a Jira instance. The only steps you have to do is:</p>
<ol>
<li>Find the distinguishable identifier from the affected page's URL.</li>
<li><code>grep</code> the logs for this information.</li>
</ol>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Jira: Custom field with id 'customfield_ID' does not exist]]></title><description><![CDATA[Fix the "java.lang.IllegalArgumentException: Custom field with id 'customfield_id' does not exist" issue with this guide.]]></description><link>https://justinalex.com/jira-custom-field-with-id-customfield_id-does-not-exist/</link><guid isPermaLink="false">5ec94294e381100001b6d498</guid><category><![CDATA[Jira]]></category><category><![CDATA[Atlassian]]></category><dc:creator><![CDATA[Justin Alex Paramanandan]]></dc:creator><pubDate>Sat, 27 Dec 2014 23:47:00 GMT</pubDate><media:content url="https://justinalex.com/content/images/2018/02/Missing-Custom-Field.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://justinalex.com/content/images/2018/02/Missing-Custom-Field.png" alt="Jira: Custom field with id 'customfield_ID' does not exist"><p>If you ever browse to a project's settings to change the notification scheme, you might bump into a stack trace; resulting in you to not being able to change the notification scheme for that project, or other projects that share this same notification scheme. This guide will show you how to resolve this issue.</p>
<blockquote>
<p><em>Cover photo by <a href="https://www.instagram.com/jusuchyne_illustrations/">chyneyee</a>. See more of her work here: <a href="https://www.redbubble.com/people/chyneyee">Redbubble</a></em></p>
</blockquote>
<h1 id="stacktrace">Stack Trace</h1>
<pre><code class="language-bash">Cause:
java.lang.IllegalArgumentException: Custom field with id 'customfield_10034' does not exist.
Stack Trace: [hide]
java.lang.IllegalArgumentException: Custom field with id 'customfield_10034' does not exist.
at com.atlassian.jira.issue.fields.DefaultFieldManager.getCustomField(DefaultFieldManager.java:674)
at com.atlassian.jira.notification.type.UserCFValue.getArgumentDisplay(UserCFValue.java:196)
at com.atlassian.jira.projectconfig.contextproviders.ProjectNotificationContextProvider.getNotifications(ProjectNotificationContextProvider.java:179)
at com.atlassian.jira.projectconfig.contextproviders.ProjectNotificationContextProvider.getContextMap(ProjectNotificationContextProvider.java:102)
at com.atlassian.jira.plugin.webfragment.CacheableContextProviderDecorator.initContextMap(CacheableContextProviderDecorator.java:70)
at com.atlassian.jira.plugin.webfragment.CacheableContextProviderDecorator.getContextMap(CacheableContextProviderDecorator.java:46)
at com.atlassian.plugin.web.descriptors.DefaultWebPanelModuleDescriptor$ContextAwareWebPanel.getHtml(DefaultWebPanelModuleDescriptor.java:143)
at com.atlassian.jira.projectconfig.tab.WebPanelTab.getTab(WebPanelTab.java:75)
at com.atlassian.jira.projectconfig.servlet.PanelServlet.outputTab(PanelServlet.java:163)
at com.atlassian.jira.projectconfig.servlet.PanelServlet.doGet(PanelServlet.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.atlassian.plugin.servlet.DelegatingPluginServlet.service(DelegatingPluginServlet.java:42)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.atlassian.plugin.servlet.ServletModuleContainerServlet.service(ServletModuleContainerServlet.java:52)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
...
</code></pre>
<p>Do note that <code>customfield_10034</code> is the ID of the problematic custom field. It could be any value apart from <code>10034</code>.</p>
<hr>
<h1 id="possiblecauses">Possible Cause(s)</h1>
<p>One of the most probable occurrence of this issue is when you are migrating your Jira instance from one location to the next, but do not have the specific custom field in the new instance yet. In natural cases, it is possible to specify a custom field to the notification scheme (an example of this is when you would like to notify a group of users based on the custom field itself).</p>
<hr>
<h1 id="resolutions">Resolution(s)</h1>
<ol>
<li>
<p>Find whether the custom field really is missing (via the database):</p>
<pre><code class="language-sql">select * from customfield where id = 10034;
</code></pre>
<p>If the result came out to zero, then the custom field is indeed missing:</p>
<pre><code class="language-sql">id | customfieldtypekey | customfieldsearcherkey | cfname | description | defaultvalue | fieldtype | project | issuetype
----+--------------------+------------------------+--------+-------------+--------------+-----------+---------+-----------
(0 rows)
</code></pre>
</li>
<li>
<p>Find related notifications referring to the said custom field:</p>
<pre><code class="language-sql">select * from notification where notif_parameter = 'customfield_10034';
</code></pre>
<p>This query would return a lot of notifications types:</p>
<pre><code class="language-sql">id   | scheme | event | event_type_id | template_id |       notif_type        |  notif_parameter
-------+--------+-------+---------------+-------------+-------------------------+-------------------
10051 |  10000 |       |             2 |             | User_Custom_Field_Value | customfield_10034
10052 |  10000 |       |             3 |             | User_Custom_Field_Value | customfield_10034
10053 |  10000 |       |             4 |             | User_Custom_Field_Value | customfield_10034
10050 |  10000 |       |             1 |             | User_Custom_Field_Value | customfield_10034
10054 |  10000 |       |             5 |             | User_Custom_Field_Value | customfield_10034
10055 |  10000 |       |             6 |             | User_Custom_Field_Value | customfield_10034
10057 |  10000 |       |             7 |             | User_Custom_Field_Value | customfield_10034
10056 |  10000 |       |            14 |             | User_Custom_Field_Value | customfield_10034
10058 |  10000 |       |             8 |             | User_Custom_Field_Value | customfield_10034
10059 |  10000 |       |             9 |             | User_Custom_Field_Value | customfield_10034
10061 |  10000 |       |            11 |             | User_Custom_Field_Value | customfield_10034
10060 |  10000 |       |            10 |             | User_Custom_Field_Value | customfield_10034
10063 |  10000 |       |            15 |             | User_Custom_Field_Value | customfield_10034
10062 |  10000 |       |            12 |             | User_Custom_Field_Value | customfield_10034
10065 |  10000 |       |            13 |             | User_Custom_Field_Value | customfield_10034
10064 |  10000 |       |            16 |             | User_Custom_Field_Value | customfield_10034
10263 |  10021 |       |             3 |             | User_Custom_Field_Value | customfield_10034
10265 |  10021 |       |             2 |             | User_Custom_Field_Value | customfield_10034
10268 |  10021 |       |            14 |             | User_Custom_Field_Value | customfield_10034
10274 |  10021 |       |            12 |             | User_Custom_Field_Value | customfield_10034
10269 |  10021 |       |             7 |             | User_Custom_Field_Value | customfield_10034
10262 |  10021 |       |             1 |             | User_Custom_Field_Value | customfield_10034
10272 |  10021 |       |            10 |             | User_Custom_Field_Value | customfield_10034
10267 |  10021 |       |             5 |             | User_Custom_Field_Value | customfield_10034
10266 |  10021 |       |             6 |             | User_Custom_Field_Value | customfield_10034
10276 |  10021 |       |            16 |             | User_Custom_Field_Value | customfield_10034
10271 |  10021 |       |             9 |             | User_Custom_Field_Value | customfield_10034
10277 |  10021 |       |            13 |             | User_Custom_Field_Value | customfield_10034
10273 |  10021 |       |            11 |             | User_Custom_Field_Value | customfield_10034
10275 |  10021 |       |            15 |             | User_Custom_Field_Value | customfield_10034
10264 |  10021 |       |             4 |             | User_Custom_Field_Value | customfield_10034
10270 |  10021 |       |             8 |             | User_Custom_Field_Value | customfield_10034
11006 |  10021 |       |            17 |             | User_Custom_Field_Value | customfield_10034
11031 |  10000 |       |            17 |             | User_Custom_Field_Value | customfield_10034
(34 rows)
</code></pre>
</li>
<li>
<p>Confirm which notification schemes are these notifications attached to. Use the values in the <code>scheme</code> column in the previous SQL query:</p>
<pre><code class="language-sql">select * from notificationscheme where id = 10000 OR id = 10021;
</code></pre>
<p>You'll get a list of notification schemes:</p>
<pre><code class="language-sql">id   |                   name                    | description
-------+-------------------------------------------+-------------
10000 | Default Notification Scheme               |
10021 | [LS] AIRlog - Default Notification Scheme |
(2 rows)
</code></pre>
</li>
<li>
<p>Delete notifications with the problematic custom field:</p>
<pre><code class="language-sql">DELETE from notification where notif_parameter = 'customfield_10034';
</code></pre>
</li>
<li>
<p>Restart Jira.</p>
</li>
</ol>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Ubuntu: Install Oracle Java JDK 8 without a PPA]]></title><description><![CDATA[Learn to install Oracle Java JDK in Ubuntu without a PPA, and set it up entirely with environment variables and PATH variables set.]]></description><link>https://justinalex.com/ubuntu-install-oracle-java-jdk-8/</link><guid isPermaLink="false">5ec94294e381100001b6d497</guid><category><![CDATA[Ubuntu]]></category><category><![CDATA[Java]]></category><dc:creator><![CDATA[Justin Alex Paramanandan]]></dc:creator><pubDate>Mon, 22 Dec 2014 02:00:00 GMT</pubDate><media:content url="https://justinalex.com/content/images/2018/01/photo-1489875347897-49f64b51c1f8.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://justinalex.com/content/images/2018/01/photo-1489875347897-49f64b51c1f8.jpg" alt="Ubuntu: Install Oracle Java JDK 8 without a PPA"><p>A typical installation of Ubuntu comes prepacked with the OpenJDK environment. This environment is substantially enough for regular users who wish to develop simple Java programs. However, some Java libraries are not included or compatible with the OpenJDK environment. Take <a href="https://justinalex.com/tag/jira/">Atlassian Jira</a> as an example of an application that requires the more traditional and proprietary Sun Java JDK platform. Due to its proprietary status, Ubuntu does not include this in its repository. Hence, we would need to install this manually.</p>
<blockquote>
<p>Despite the title, this guide has also been tested in a Fedora, Debian and CentOS environment. If it doesn't work for you, let me know by leaving a comment below! :)</p>
</blockquote>
<blockquote>
<p><em>Cover photo by <a href="https://unsplash.com/photos/fPkvU7RDmCo?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Caspar Rubin</a> on <a href="https://unsplash.com/photos/hpjSkU2UYSU?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></em></p>
</blockquote>
<h1 id="checkoperatingsystemtype">Check Operating System Type</h1>
<p>First things first, check whether you’re running on 32-bit or 64-bit Ubuntu:</p>
<pre><code>uname -m
</code></pre>
<p>The result will show you what type of operating system you have:</p>
<ul>
<li><strong>i686</strong> – 32-bit kernel</li>
<li><strong>x86_64</strong> – 64-bit kernel</li>
</ul>
<hr>
<h1 id="instructions">Instructions</h1>
<h2 id="initialsetup">Initial setup</h2>
<p>Now, go to the <a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html">Oracle JDK download site</a> and decide which version of JDK you would prefer.</p>
<p>In this guide, we'll be downloading Java JDK 8 Update 162. Accept the agreement, and copy the <code>tar.gz</code> link for your operating system type.</p>
<p>We'll use <code>wget</code> to download the compressed file. In your terminal, type the following:</p>
<pre><code class="language-bash">wget --no-cookies --no-check-certificate --header &quot;Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie&quot; &quot;http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/jdk-8u162-linux-x64.tar.gz&quot;
</code></pre>
<p>The cookie header is included in the <code>wget</code> command because Oracle does not allow a direct download without accepting their agreement; thus, we parse a cookie to ensure that Oracle recognises that you have accepted their agreement.</p>
<p>Create a new directory under <code>opt</code>:</p>
<pre><code class="language-bash">sudo mkdir /opt/java
</code></pre>
<p>Then, extract the compressed file to the above directory:</p>
<pre><code class="language-bash">sudo tar -xzvf jdk-8u162-linux-x64.tar.gz -C /opt/java/
</code></pre>
<p>Verify that the files are extracted correctly:</p>
<pre><code class="language-bash">cd /opt/java
</code></pre>
<pre><code class="language-bash">ll
</code></pre>
<pre><code class="language-bash">total 12K
drwxr-xr-x 3 root root 4.0K Jan 10 05:16 .
drwxr-xr-x 3 root root 4.0K Jan 10 05:12 ..
drwxr-xr-x 8 uucp  143 4.0K Sep  6 02:32 jdk1.8.0_162
</code></pre>
<p>Now, we’ll create a symbolic link called <code>current</code> and link it with the newly extracted JDK directory:</p>
<pre><code class="language-bash">sudo ln -s jdk1.8.0_162/ current
</code></pre>
<pre><code class="language-bash">ll
</code></pre>
<pre><code class="language-bash">total 12
drwxr-xr-x 3 root root 4096 Jan 10 05:20 ./
drwxr-xr-x 3 root root 4096 Jan 10 05:12 ../
lrwxrwxrwx 1 root root   12 Jan 10 05:20 current -&gt; jdk1.8.0_162/
drwxr-xr-x 8 uucp  143 4096 Sep  6 02:32 jdk1.8.0_162/
</code></pre>
<h2 id="setenvironmentvariablesandpath">Set Environment Variables and Path</h2>
<p>Finally, we’re going to set the <code>$JAVA_HOME</code> environment variable so that you’ll be able to run most Java applications.</p>
<h3 id="tosetforasingleuser">To set for a single user:</h3>
<p>Let’s load the <code>.bash_profile</code> from the home directory:</p>
<pre><code class="language-bash">nano ~/.profile
</code></pre>
<p>Go to the end of the file, and add the following:</p>
<pre><code class="language-bash">export JAVA_HOME=/opt/java/current
export PATH=$PATH:$JAVA_HOME/bin
</code></pre>
<p>Hit <code>Ctrl</code> and <code>x</code> to save the file, and <code>y</code> to overwrite it.</p>
<p>Finally, to ensure the changes are instant, run the following command:</p>
<pre><code class="language-bash">source ~/.profile
</code></pre>
<h3 id="tosetforallusers">To set for all users:</h3>
<p>This step is similar to the above, with the only exception being that you would need to edit the global <code>profile</code> file. This allows every user the right to understand the environment variable that was set.</p>
<p>The global <code>profile</code> file can be found in the <code>/etc/</code> directory. You'll need to use the <code>sudo</code> command to make changes to this file.</p>
<hr>
<h1 id="verification">Verification</h1>
<p>Once it's all completed, run the <code>java -version</code> command to verify the correct Java version and type:</p>
<pre><code class="language-bash">java -version
</code></pre>
<pre><code class="language-bash">java version &quot;1.8.0_162&quot;
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>