[JIRA] Broken Permission Schemes?

Edit (24 May): Spoiler alert! There’s a better way.

I came across a corrupted JIRA database with all projects lost their permission schemes.

From the database, I believe this happens when corresponding records were deleted from the NODEASSOCIATION table. Whatever the cause is, you’ll notice the following log entry in atlassian-jira.log when this happens:

2017-05-23 02:57:18,363 WARN [permission.DefaultPermissionSchemeManager]: No permission scheme is associated with project ''

The problem is, (in JIRA 7.1.x) when you navigate to Project Administration –> Permissions to associate it with a scheme, you’ll see an empty page. For a newly created project Default Permission Scheme should show up, but now it absolutely has no permission scheme. It’s lost.

So, here’s the expensive but easy solution. Use the Script Runner add-on. Execute this Groovy code in the script console and it will fix everything in a minute!

import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.bc.project.ProjectService;
import com.atlassian.jira.bc.project.ProjectService.UpdateProjectSchemesValidationResult;

def projectService = ComponentManager.getComponent(ProjectService.class);
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser();

Long permissionSchemeId = 10000; // ID of the permission scheme that you wish to associate to each project
Long notificationSchemeId = null;
Long issueSecuritySchemeId = null;
ProjectService.UpdateProjectSchemesValidationResult validationResult = projectService.validateUpdateProjectSchemes(currentUser, permissionSchemeId, notificationSchemeId, issueSecuritySchemeId);

ComponentAccessor.getProjectManager().getProjectObjects().each {
  projectService.updateProjectSchemes(validationResult, it);

As it can be understood from the code, you can fix Notification Schemes and Issue Security Schemes using the same way.

Do crashbars protect your legs?

I am a motorcycle rider who encountered with a number motorcycle accidents and still in one piece.

Being a high speed fanatic, I read more and more about motorcycle safety following each accident. I explored ways to avoid trouble without losing the thrill of speed. As motorcycle training in Sri Lanka doesn’t commence in a professional way, most of the motorcycle riders have just a set of self-taught incomplete skills and beliefs.

When reading about motorcycle safety online I found a quite interesting thing called the “Hurt Report”. I’m not sure how far these findings of the Hurt Report are valid in Sri Lanka — and practically I experienced that the finding about crashbars isn’t quite true. Well, at least not for me.

It says,

Crash bars are not an effective injury countermeasure; the reduction of injury to the ankle-foot is balanced by increase of injury to the thigh-upper leg, knee, and lower leg.

So what does my experience say? I had a 150 cc Hero Honda Hunk (2011 model). In Sri Lanka it’s an average intermediate level motorcycle with a considerable body weight. When I ride I usually keep my legs close, each in tight contact with the fuel tank. In one of the two encounters where crashbars involved, right side crashbar bent due to direct impact with road surface. I decided to repair it instead of buying a new one – and voilà – it was not only bent, but also fractured!

I have seen many motorcycle owners ride bikes with crashbars just bent due to previous accidents, but this was the first time I saw one actually bent and cracked.

Now, imagine what could have happened to my kneecap if there was no crashbar and I kept my legs open! It’s a horrific feeling. Crashbars do protect – but also important to have your legs closed.

How I use Facebook on Android

Once installed their app, Facebook thinks they own our mobile devices.

At first, there was the peaceful all-purpose Facebook app. And some time later they separated messaging into another app, creating the Messenger. Initially it was at user’s discretion to use Messenger or Facebook app for messaging. Initially it looked polite but lately everyone was gradually forced to install Messenger. Another app… sigh! Personally, for me messaging is just messaging. I don’t want a childlike fairyland for just sending and receiving messages.

It didn’t stop there. Facecbook took unfair advantage of Samsung TouchWiz feature for displaying notification count on the app icon. When there are unread messages, Facebook app will add that up to notification count, forcing your mind to install the Messenger (or read them on computer to clear notifications).

And now it has come down to infiltrating our privacy through social engineering.

After all these took place, finally something is here that we can thank Facebook for. that is called Messenger Lite. That helps, because I don’t have to install that monstrous Messenger app just to read and send a line on the go. With Facebook app and Messenger Lite installed, here’s how I get maximum use of Facebook without letting it use me and eat up my phone.

Zero notifications

Go to Facebook app settings –> Notifications, and simply turn them all off at once. Who wants to be disturbed for every single Like and comment during an important office meeting?

Who wants fancy sounds?

Settings –> Sounds in the App – Turn it off. Just because I don’t want others to know that I’m using Facebook during a boring office meeting too!

Privacy of your contacts could be your responsibility too

Settings –> Continuous Contacts Upload – Turn it off.

I don’t want to be disturbed by every single new message

Go to Messenger Lite –> Notifications & Sounds.

Notifications: on. Notification previews: off. Vibrate: off. Light: on. Sound: off.

Now, one last thing. Messenger Lite app icon on GoogleNow launcher goes as just “Lite” that’s absurd (they think Messenger Lite is the only lite app?). Now I found a cool app called QuickShortcutMaker which will do the trick (you’ll figure out how to use it). I created a custom icon named “Messenger Lite” and removed the one placed by the official app installer. Now, all set.

However, these are my personal settings. Setting that prevent me from wasting too much attention on Facebook, making me use it only when needed. These settings may not work for you as-is, but I think it provides you with a good suggestion.

Why should you see a doc

Recently I encountered a little accident and thought I should keep this little note written somewhere. We, Sri Lankan are usually reluctant to go for medical advice when damage appears to be small. “Ah.. it’s nothing. It’ll heal.”, is it? We get most of our medical expenses covered by the government, and for these little things we are less likely to spend a night or two at hospital.

As soon I encountered the scene I rushed to the hospital because I was afraid of serious internal damage to my hand, though the wound looked like just a deep puncture and swelling caused by it. Even few people told me there’s nothing to be afraid of. X-ray was taken and doctors concluded no tendon damage (they took X-ray for a reason, isn’t it?). An overnight hospital stay for free!

Before I am discharged from the hospital I met another man who came to visit a patient. His piece gave me the motivation to write this little note. When he clench his hand, little finger (pinky) stops halfway. It won’t clench unless external force is applied, and when released it will pop back to the previous position as if it was spring loaded.

“What happened?”

“Couple of years ago two of my fingers were accidentally cut by a knife. I went to the local hospital. Doctors wanted to transfer me to base hospital. I refused and told them this is just a minor wound, so basic treatments will do.”

After arguing with doctors, the man had discharged at will. And sustained permanent dysfunction of his little finger. A stupid trade-off when you get everything for free.

If you encounter a physical injury despite of its seriousness appearing to you from outside, see a doctor. Give them as much as information, not instructions.

What now, Mobitel?

Recently I wrote about Mobitel LiveScreen because I was unhappy about the experience.

As soon I published that on my Facebook page (850+ likes), it instantly took vast public attention. So far it reached 13,000+ people without targeted advertising. Given my page’s member base is small, the post made a significant reach. Unless advertised none of my other blog posts ever reached more than 500 people on average. By the time of this writing, I’ve seen more people have started to voice against VAS scams which is a good trend.

Get the message, Mobitel? Lots of people think that you violate proper business etiquette.

Mobitel staff may think I’m a douchebag, but I am certainly not that type. I am a loyal customer who always appreciate quality service (examples available). But when it comes to daylight robbery, I can turn into a real pain-in-ass customer. From the feedback I received from readers, I realize that every Sri Lanakn telco is playing this dirty game.

So, what now, if Mobitel (and other telcos) care to listen?

Value Added Services (VAS) in Sri Lankan telco industry probably have a history over more than 10 years (history that I know of). At that time the devices we used had limited capabilities. GPRS for Internet. No Viber/ WhatsApp/ SnapChat. WAP played God. SMS and MMS ruled.

In that era, downloading a celebrity’s portrait and setting it as phone’s screen background was a real deal. Now some people might be thinking, why can’t you simply download it, crop it by yourself and then set as wallpaper? There were several real world problems with that.

That problems enabled telcos to make some extra profit out of a wallpaper and ringtone business through WAP sites. I remember people used to download wallpapers, ringtones, and even games through WAP sites. It didn’t end up there. Content such as jokes, astrology, religious prayers were delivered to subscribers’ phones as SMS at a fee. This used to be a service that people wanted.

Now it’s 2016. We have Android that supercharged the mobile phone users. Most have smartphones. We have Google that will get us what we need effortlessly. Facebook has a lot of memes that you can enjoy. Lot of free and paid games are out there in Google Play. Almost everything is available for free. Zedge has a plethora of wallpapers and ringtones.

Do customers still want WAP-based entertainment sites? I don’t think so. That era is gone. Unfortunately, telcos such as Mobitel and Etisalat don’t seem to realize this. Or rather, they pretend to be not seeing it. Instead of striving to deliver value to the customer, they desperately attempt to hard-sell the same WAP content – just like Darley road car accessory traders do.


  1. By unsolicited activation of LiveScreen on newly purchased/ replaced SIM cards. These pop ups appear intermittently in a way that ‘OK’ button (meaning ‘I Agree’) could be unintentionally touched.
  2. By directly exposing our accounts to third party content providers to bill us as they wish. So, if a pop-up ad in a web page is touched accidentally, you don’t even know but they bill us on the spot.

(I can provide more detailed logical explanations on why this is not gentlemanly – if you happen to lack of common sense)

Are these telcos too lazy to innovate?

As a customer, I do not see why should I pay Rs. 30/ month to get home remedies via SMS. There is a plenty of Facebook pages that offer the same for free. I do not see why should I pay a WAP site to download pictures of a fashion model when Google gets me there for free. Rather than investing in an innovative service that delivers what customer needs, these telcos have totally ditched the sales etiquette, and they trade off their brand reputation for unsolicited VAS subscriptions.


Why don’t you do some market research to identify what kind of devices people use? I hardly think Android users who have subscribed to mobile data-included packages will have any interest in jokes via SMS. Why can’t you do a little market research to understand what people actually need? I have absolutely no interest in what happens around Bollywood, but there are other things that I’m interested in. As a busy worker, I’d rather be interested in things like road traffic alerts, train delays, freelancing opportunities, etc. Also, it’s worth understanding that SMS is only good for things that need urgent attention, such as breaking news alerts and job search.

Just think about your brand reputation and what customers are ought to do about this next. No more daylight robbery, please.

Mobitel LiveScreen මගඩිය

මෑතකදි මමයි අම්මයි දෙන්නම අළුත් මොබයිල් ෆෝන් දෙකකට මාරු වුණා. ඉතින් පරණ එකෙන් අළුත් එකට මාරු වෙද්දි අළුත් ෆෝන් එකට ගැළපෙන විධියට සිම් එකත් මාරු කරන්න වුණා. පරණ සිම් එක ඉවත් කරලා අපට Micro SIM එකකුත් Nano SIM එකකුත් තිබුණු පරණ දුරකථන අංක වලටම ලබාගන්න සිදුවුණා.

අළුත් සිම් දාපු හැටියේ මෙන්න එනවා SMS එකක්, Welcome to LiveScreen කියලා… මේ මොකක්ද? අපි ඒ ගැන ඒ හැටි හිතුවේ නෑ. නමුත්, මෙන්න දවසක් දෙකක් ගියාට පස්සෙ එනවා pop-up messages.

Remedies for all your problems! Get 1 Home Remedy daily @Rs.30/ month. Click OK!

මම නම් දන්නවනේ මේ මොකක්ද කියල. හොඳ වෙලාවට අම්මා මේකට අහුවෙලත් නෑ. ෆෝන් එක පාවිච්චි කර කර ඉන්නකොට, එක්කෝ ෆෝන් එක සාක්කුවෙ තියෙද්දි, මේ පොප් අප් message එක එනවා. වැරදිලාවත් OK එක ක්ලික් වුණොත් රුපියල් තිහක් එක්ක බදු මුදලකට කෙළවෙනවා.

පිටකොටුවෙ පේමන්ට් එකේ බාල බඩු විකුණන තොරොම්බල් වෙළෙන්දෙකුගෙ තත්වයට මේ ආයතනත් පත් වෙලා දැන්. මේ ගැන Facebook හරහා කතා කරද්දි අහන ප්‍රශ්න වලින් ලිස්සලා යන්නත් Mobitel ආයතනය ප්‍රවේසම් වෙනවා. 🙂

ඉතින් මේ මගඩිය නවතින වගක් පේන්න නැති නිසා අළුතින් Mobitel SIM එකක් ගන්න අයටත්, පරණ නොම්මරේටම අළුත් SIM එකක් Mobitel වෙතින් ලබාගන්නා අයටත්, SIM එක ෆෝන් එකට දාගෙන ඒක ඇක්ටිව් වුණු ගමන්ම කළ යුතු පළවෙනිම කාරිය විධියට LiveScreen ඉවත් කරන හැටි කියා දෙන්න.

Menu (app drawer) –> SIM Toolkit –> LiveScreen –> Activate –> Deactivate –> Confirm

හැක්ඃ! Confirm කරන්නත් අහනවා.. 😀 හැම දේම අද කාලේ “OK Google, get me a home remedy for…” කියල හොයාගනිද්දි මාසෙට රුපියල් තිහක් ගෙවල දවසට SMS එක ගානේ ගෙන්නගන්න අපට පිස්සු නෑ. 🙂

Wunderlist Today wallpaper for Ubuntu

Wunderlist again. Currently this is the only Microsoft thing that I use – apart of Windows servers involved in my DevOps job.

Wunderlist hasn’t been treating nice for Ubuntu recently. So I thought about working on something that works for Ubuntu. Then here I got an idea of a very small app that will embed your day action items into the desktop wallpaper. Since I’m not very much into software development, this as a pilot project will make me comfortable for building something better for Ubuntu.

To be honest, first I was planning to do some browser DOM hacking and figure out how it works. Soon after, I found out that there’s a public API for Wunderlist (awesome, isn’t it?), and that can avoid the need of DOM hacking. So, that’s how wunderlist-ubu-wallpaper started as my pilot project.

It is still very young, and I’m sure my code needs a little cleanup as well. It’s just a 150 line Python script – not at all a big deal. Readme file has all the information you need to set it up on your Ubuntu. Run it and see what happens to your Ubuntu wallpaper. Isn’t that awesome?

14 years back when I was a kid, I was just making little Windows executables (I was a Windows user back then) with Visual Basic. After that I did programming to a some level when I was a systems administrator, but I was never permitted to release my work to the public for obvious reasons. After that, here comes my very first little code contribution to the world of Open Source.

By the way, my all other action items are overdue! 😳