Zack SeibertJekyll2020-12-11T22:01:09-05:00http://zacharyseibert.com/Zack Seiberthttp://zacharyseibert.com/zack@zacharyseibert.comhttp://zacharyseibert.com/blog/customizing-jira-look-and-feel2016-05-24T00:00:00-00:002016-05-24T00:00:00-04:00Zack Seiberthttp://zacharyseibert.comzack@zacharyseibert.com<h3 id="intro">Intro</h3>
<p>This is going to be a quick one.</p>
<p>At my job, we have a couple JIRA environments that we use in addition to our production environment. We use these other JIRA installs to test upgrades/updates to JIRA and to install and demo major changes and plugins.</p>
<p>We keep the look and feel of our production environment pretty much stock, so we needed a way to differentiate between our production environment and our other various JIRA installs. I’ve written some scripts that allow us to refresh these testing environments easily, so that we have current, relevant data pulled from our producton JIRA. Because these test installs can be so similar to our production JIRA after running the scripts, we needed a way to ensure that we are always aware which environment we are in.</p>
<p>Luckily, the JIRA REST API allows us to modify the look and feel of JIRA. And if we can schedule these API calls, in crontab for example, we can ensure that the look and feel for all of our environments are consistent all the time.</p>
<h3 id="the-solution">The Solution</h3>
<p>Here is a sample of the script we placed in the crontab of our test environments, scheduled to run every minute, that updates the UI/text colors, as well as the main site title:</p>
<pre><code>#!/bin/sh
##TESTING ENVIRONMENT
##Change UI Colors
##Header Background Color
/usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "#003b48"}' -H "Content-Type: application/json" https://TESTING.DOMAIN.COM/rest/api/2/application-properties/jira.lf.top.bgcolour
##Header Highlight Background Color
/usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "#708090"}' -H "Content-Type: application/json" https://TESTING.DOMAIN.COM/rest/api/2/application-properties/jira.lf.top.hilightcolour
##Header Separator Color
/usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "#ffffff"}' -H "Content-Type: application/json" https://jira-staging.trifecta.com/rest/api/2/application-properties/jira.lf.top.separator.bgcolor
##Header Text Color
/usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "#ffffff"}' -H "Content-Type: application/json" https://TESTING.DOMAIN.COM/rest/api/2/application-properties/jira.lf.top.textcolour
##Menu Item Highlight Background Color
/usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "#708090"}' -H "Content-Type: application/json" https://TESTING.DOMAIN.COM/rest/api/2/application-properties/jira.lf.menu.bgcolour
##Menu Item Highlight Text Color
/usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "#ffffff"}' -H "Content-Type: application/json" https://TESTING.DOMAIN.COM/rest/api/2/application-properties/jira.lf.menu.textcolour
##Button Background Color
/usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "#c0c0c0"}' -H "Content-Type: application/json" https://TESTING.DOMAIN.COM/rest/api/2/application-properties/jira.lf.hero.button.base.bg.colour
##Set Title
/usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "TESTING ENVIRONMENT"}' -H "Content-Type: application/json" https://TESTING.DOMAIN.COM/rest/api/2/application-properties/jira.title
</code></pre>
<p><a href="http://zacharyseibert.com/blog/customizing-jira-look-and-feel/">Customizing JIRA Look and Feel</a> was originally published by Zack Seibert at <a href="http://zacharyseibert.com">Zack Seibert</a> on May 24, 2016.</p>http://zacharyseibert.com/blog/beer-quantity-time-tracking2016-03-07T00:00:00-00:002016-03-07T00:00:00-05:00Zack Seiberthttp://zacharyseibert.comzack@zacharyseibert.com<h3 id="intro">Intro</h3>
<p>In my last post, I talked about how I use JIRA to <a href="http://www.zacharyseibert.com/blog/jira-as-a-beer-inventory-system/">keep track of my ever-growing beer collection.</a> Atlassian was cool enough to host it as a <a href="http://blogs.atlassian.com/2016/03/my-life-runs-on-jira-clever-inventory-system/">guest post</a> on Atlassian’s Blog!</p>
<p>I’m constantly looking for ways to improve my setup, and one nagging issue I’ve had is counting up the total quantity of beers I have scattered throughout the basement. I have a quantity custom field on each beer, but the field is not summable using JQL. I had to come up with something else.</p>
<h3 id="time-to-think">Time To Think</h3>
<p>I knew I needed a way to get a summable field onto each beer (issue.) I thought about using some workflow triggers to add or subtract from a value as each beer goes through the workflow. This was overly complicated and would have been far more work than it was worth. I wanted this to be simple.</p>
<p>I looked through the <a href="https://marketplace.atlassian.com">Atlassian Marketplace</a> to see if there were any summable custom fields I could install in my environment. There were a couple options, but most were either only available for self-hosted environments, or they were prohibitively expensive for this use-case.</p>
<p>There had to be another way.</p>
<h3 id="on-the-right-track">On The Right Track</h3>
<p>After putting the problem aside for a bit, a solution finally came to me while I was at work. I was setting up a new filter to keep track of the hours logged for a new client, and I was using the filter for a dashboard gadget that would <i>sum up the total.</i></p>
<p>This was it. I could use JIRA Time Tracking to track the quantity of each beer, and sum that quantity using the built-in Time Tracking functions.</p>
<p>I needed to change some time tracking settings to get this working. Since this is my personal environment, it was simple to change what I needed. This is a global change however, so if you do this <i>be aware that it will affect all projects that use Time Tracking.</i></p>
<p>I decided that each unit of beer would equal 1 day when logging work. I set the “Hours per day” to 1 and the “Days per week” to 7. This way there would be no real way for me to log less than one beer at a time. I changed the format to “days” since I won’t be dealing in values other than whole days, and I made the Default Unit “day” so that, from the Log Work screen, I could just type the number without the unit (m,h,d).</p>
<p><img src="/images/beer_tracking_2.png" alt="New Time Tracking Settings" /></p>
<p>Next, I setup a filter to find all issues in the project BEER that did not have any time logged against it.</p>
<p><img src="/images/beer_tracking_4.png" alt="Filter" /></p>
<p>Unfortunately, “Work Logged” is not a field that can be set using the <a href="https://confluence.atlassian.com/jira/modifying-multiple-bulk-issues-185729606.html">Bulk Change Tool</a>, so I would have to set this manually. I already had quantity defined through the custom field on each issue, so this was just a matter of working through each indiviual issue and logging work to match the quantity that was already set. This was made tremendously easy using the Operations dialog box:</p>
<p><img src="/images/beer_tracking_5.png" alt="Operations dialog box" /></p>
<p>To access the Opertaions dialog box, just press period (.) in any JIRA window, and you will be presented with a searchable list of any action you can run on an issue. Using this to log work and then move to the next issue in my filter list made it so I never had to leave the keyboard while doing the initital time-logging for all of the existing beers.</p>
<p>Despite how great the Operations dialog box is, it still took awhile for the intial data-load. In an effort to speed things up, I may have depleted some inventory in the process.</p>
<p>After all was said and done, I was left with beers fully popualted with Time Tracking data:</p>
<p><img src="/images/beer_tracking_3.png" alt="Time Tracking in Action" /></p>
<p><br /></p>
<h2 id="summing-things-up">Summing Things Up</h2>
<blockquote>
<p>Yeah, yeah, but your scientists were so preoccupied with whether or not they could that they didn’t stop to think if they should.</p>
<p>Dr. Ian Malcolm, Jurassic Park</p>
</blockquote>
<p>This quote kept popping into my head as I was logging work on each issue. Now I was at the point of no return. I had to come to terms with the size of the collection. Maybe I would have been better off not knowing how much beer I had down in the basement. Ignorance is bliss, right?</p>
<p>I couldn’t stop now.</p>
<p>I chose to use the “Workload Pie Chart” gadget, so that I could see a breakdown of how much of each style of beer I had. A well-balanced collection is a happy collection.</p>
<p><img src="/images/beer_tracking_1.png" alt="Dashboard Gadget" /></p>
<p>As you can see, the current total is 161 beers, the overwhelming majority of which are Stouts. I expected that. What I did not expect was the disappointing lack of sour beers from the Pie Chart. There are so few that they have been relegated to the “Other” slice. I guess I just drink them too quickly.</p>
<p>All-in-all I am pretty satisfied with this solution. I was able to get this working without too much over-complication and without having to use any overhead associated with add-ons or extensive customizations. The only downside is having to make sure that I record both quantity and time spent when creating new beers in the system, but I can make that pretty easy through workflow transition screens.</p>
<p>Time to go log some work!</p>
<p><a href="http://zacharyseibert.com/blog/beer-quantity-time-tracking/">Logging Beer Quantity with JIRA Time Tracking</a> was originally published by Zack Seibert at <a href="http://zacharyseibert.com">Zack Seibert</a> on March 07, 2016.</p>http://zacharyseibert.com/blog/jira-as-a-beer-inventory-system2016-02-23T00:00:00-00:002016-02-23T00:00:00-05:00Zack Seiberthttp://zacharyseibert.comzack@zacharyseibert.com<h3 id="intro">Intro</h3>
<p>I use JIRA a lot at my job. I use a bunch of the <a href="www.atlassian.com">Atlassian</a> products every day, but JIRA is my favorite. At work, we track all of our internal issues in JIRA, plan and track all of our developement in JIRA, and conduct all of our client-facing support in JIRA and JIRA Service Desk.</p>
<p>About a year and a half ago, I found <a href="http://blogs.atlassian.com/2014/03/jira-asset-management-overview/">this series of blog posts</a> on the Atlassian Blogs network about using JIRA as an asset management system. We were currently looking around for a way to inventory all of our assets in anticipation of a move to a new office building. The bulk of the enterprise-level asset management suites start well north of $10,000 and would take a serious time investment to get started.</p>
<p>We already had JIRA in our environment, why not give it a shot?</p>
<p>Well, it worked great. Our system as it stands now has over 800 assets in it spread over 3 countries and 2 continents. It has been a really great implementation for us and has proven to be uniquely flexible in a way that most other systems we looked into were not.</p>
<p>But how flexible could it be, really?</p>
<h3 id="the-beer-problem">The Beer Problem</h3>
<p>I have a problem. I like to collect things. The collections tend to get a little out of control. It started when I was younger with baseball cards and Legos. Then it was sneakers. I worked at Footlocker just for the discount so I could feed my habit. Most recently, my collecting efforts have been focused on craft beer.</p>
<p>I buy beer faster than I can drink it. I lose track of what I have. I have 4 refrigerators or freezers in my house. They all have beer in them. It got out of control.</p>
<h3 id="the-solution">The Solution</h3>
<p>At some point it dawned on me that the solution to my beer problem was looking at me in the face each and every day. I could use JIRA for my own personal beer inventory system. It works for laptops and monitors, why not cans and bombers too?</p>
<p>So I set off and signed up for my own <a href="https://www.atlassian.com/ondemand/signup/form?product=jira-software.ondemand">JIRA Cloud account</a> and got going. We use hosted JIRA at work, so at the very least this would give me some insight and experience into the differences between hosted and OnDemand JIRA solutions. This is like continuing education.</p>
<p>Right?</p>
<h2 id="the-setup">The Setup</h2>
<p>Getting this setup did not take too long at all since I already had gone through this twice now having setup the asset management system at work and once for a client as well. So I created the custom fields specific to craft beer, added them to the appropriate screens, and started adding inventory:</p>
<p><img src="/images/jira_beer_2.png" alt="Issue Screen" /></p>
<p><br />
<i>I plan on going into more depth about the custom fields and field configurations in a later blog post.</i></p>
<p>Next I needed a workflow since the standard “ToDo, In Progress, Done” wasnt going to cut it. I do some beer trading occassionally, and I have given some beer away too, so I needed a workflow that accomodated those actions. Oh yeah, and drinking it to. I do that.</p>
<p><img src="/images/jira_beer_3.png" alt="Workflow" /></p>
<p><br /></p>
<p>The “To Be Inventoried” status lets me add beers quickly, and the fill in the details later before officially putting them “In Stock.”</p>
<p>Each workflow transition has a screen that allows me to update how many beers I have left after drinking (each unique beer is assinged to an issue, and then multiple beers are denoted in the quantity custom field on the beer issue) and if they moved to a different fridge.</p>
<p><img src="/images/jira_beer_4.png" alt="Transition" /></p>
<p><br />
Last, I setup a dashboard so that I could keep track of everything:</p>
<p><img src="/images/jira_beer_1.png" alt="Dashboard" /></p>
<p><br />
The dashboard lets me see what I have in stock, what I have designated as something I need to drink now (can’t let those IPAs go too long) and what beers I still need to add details for.</p>
<h3 id="going-forward">Going Forward</h3>
<p>So far, this has worked great for me. It has not stopped me from collecting, but I have a much better idea of what I have now (and unfortunately what I don’t.) I’m already working on another project for wine and spirits (where did all this bourbon come from?)</p>
<p>I plan on working on some sort of display for the main beer fridge, maybe using the <a href="https://marketplace.atlassian.com/plugins/com.atlassian.jirawallboard.atlassian-wallboard-plugin/cloud/overview">Wallboard Plugin</a> or maybe just the dashboard on a fridge-mounted iPad. I have also looked into using <a href="https://www.atlassian.com/software/jira/service-desk/">Service Desk</a> to make adding beers easier right from the fridge.</p>
<p>After all that, I think it’s time for a beer. Going to have to check my “Drink Now!” filter.</p>
<p><a href="http://zacharyseibert.com/blog/jira-as-a-beer-inventory-system/">JIRA As a Beer Inventory System</a> was originally published by Zack Seibert at <a href="http://zacharyseibert.com">Zack Seibert</a> on February 23, 2016.</p>http://zacharyseibert.com/blog/hello-world2014-02-21T00:00:00-00:002015-04-03T00:00:00-04:00Zack Seiberthttp://zacharyseibert.comzack@zacharyseibert.com<h3 id="hi">Hi</h3>
<p>This is my first post. I <em>hope</em> it’s not the last.</p>
<p>It’s probably the last. Maybe.</p>
<p><a href="http://zacharyseibert.com/blog/hello-world/">Hello World.</a> was originally published by Zack Seibert at <a href="http://zacharyseibert.com">Zack Seibert</a> on April 03, 2015.</p>