Blog from April, 2024

Why to use Python on Jira?

As per Coursera
Python is a computer programming language often used to build websites and software, automate tasks, and conduct data analysis. Python is a general-purpose language, meaning it can be used to create a variety of different programs and isn't specialized for any specific problems.

I’ve worked with a few programming languages so far, they clearly vary in complexion and levels of stress that you have on your learning curve, but surely the language that’s quicker to learn, and the more useful in general use cases, is Python.

It is used in all the industries including Space Exploration
Python is SpaceX’s most used programming language

Python is the most popular programming language because of its built-in libraries and beginner-friendliness. It is used by https://www.spacex.com/ to write the code, construct the spaceship, and then launch it into orbit. They employ a wide range of internal tools, from the most fundamental ones like NumPy and matplotlib commands to more advanced ones like the Python-based framework Django. - source

I don’t really need to oversell this, it sells itself when you check code complexity. Let’s start with the easiest comparative: the Hello World comparison in languages.

C

#include <stdio.h>

int main()
{
    printf("Hello, World!");
    return 0;
}

Java

class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!"); 
    }
}

Assembly

; ld -m elf_i386 -s -o hello hello.o
section .text align=0

global _start

message db 'Hello, World!', 0x0a

len equ $ - msg

_start:
    mov eax, 4 ;
    mov ebx, 1 ; 
    mov ecx, message;
    mov edx, len ; 
    int 0x80

    mov eax, 1
    int 0x8

and ….

Python

print("Hello, World!")

I feel like this post could end just with the comparative, but let's keep going.🤠

Some context on languages

I’m not here to demonize other languages, they all have their respective usages and Python is built on C, so under the hood that’s the engine, and as Python, all the languages have pros and cons.

I always like to show the comparative when talking about differences in programming languages because this is really a visual thing, and you have the deep understanding that less code is faster to write and easier to memorize and understand, and in this case, way more readable and direct, something that the other languages fail in a few different ways.

Using Python on Jira

Easy for Jira is a scripting extension for Jira Cloud that relies on Python for its engine, allowing you to automate, integrate, treat, use AI, etc. on your Workflows or event based, via Listeners.

Easy for Jira uses python because python is easy to learn, has a very safe learning curve compared to other languages such as C and Java or Groovy (where the shoe stands).

Personal Experience using coding apps

I’ve been working with Scriptrunner (the shoe app) for little more than 3 years now, and even having lots of experience with it, It’s always the same flow, the amount of time wasted developing in it is really too much to bear, I cannot say a word about reliability though, Scriptrunner is German technology, you can never say anything about way they design anything because it is reliable, cars, houses, everything, it is made to last and it’s surely reliable. Problem is the counter part of that reliability, we have to get their docs (even after 3 years, because their functions to make API requests are too big), or get some pre-packed code I use in all my implementations to simplify development and scale that.

As I am a developer, while using Scriptrunner I saw a lot of room for improvement, as I created the main pillars of all my scripts as a framework to develop on the app, with some ready to use functions to simplify their complications, this action made coding solutions easier.

Some of what I saw coding in Scriptrunner for 3+ years:

  1. Hard for newcomers, steep learning curve
    You take a lot of time to get some familiarity with the app, as it’s engine is in Groovy (java) and for newcomers this is really a challenge. I’ve known at least 7 individuals that gave up on learning Scriptrunner due to the high complexity allied to their little understanding of Java, they knew programming, but could not bear working with Groovy. All the code you do is like 100+ lines of code if you want something minimally complex. Coding should not be that hard.

  2. Integrations are up to you
    If you want to have any sort of integration running, you need to code it yourself, from scratch, no help at all, they do have some coding examples, but nothing really usable for integrations.

  3. Simple things made overly complicated
    Editing a single issue takes 6 lines of code with NO logic, if you add logic go to 20 lines of code, this just does not make sense as it can be direct, as it is in Easy for Jira.

  4. Time. The over complication makes it time consuming
    From the stakeholder request for a new feature, to it’s implementation, testing and deployment, considering a lot of factors but the main one the feature complexity, it can take from 5 days to up to 2 weeks, depending of course in a lot of factors. So let’s put this to numbers:
    If a consultant or admin takes 10 hours developing a solution, with an hourly rate of 65 USD, it costs to the company $650 to develop.
    Our main goal in Easy for Jira is to reduce Lead Time so the same thing you do in 10 hours in Scriptrunner, you can easily achieve in less than one hour in our app, due to the Context Variables such as the Issue object, that facilitate your assess to Issue data.

  5. Lack of reusability around the code you create
    If you want your code to run as a post function in different workflows and transitions, good luck and get ready for hours of boredom, because if you need your function running on lets say 50 transitions, it’s at least 450 mouse clicks to create that. Now you want to make a change, well, good luck again editing all the code you created, because you need to edit each one of them, to avoid that we created the Code Repository where you can code once, save your code, import it around your instance and edit it in a single place.

captain-america-i-can-do-this-all-day-20240416-184214.gif

I can be pointing all the flaws of my competitor all day, but this is not what I’m trying to do here. All the pointed items were used as founding stones on the design of Easy for Jira. I can’t say our app is perfect, it’s not, there’s a lot of features to be implemented and enhancements ahead of us so it becomes a very good app, but so far I can say as a daily user that EFJ is a fair competitor for sure.

To back that, I will outline some use cases, that is the most used functionality, editing issues and working with related issues, a comparison between the 2 apps.

This is the Scriptrunner code to edit one Issue

def response = put("/rest/api/2/issue/${issuekey}")
    .header('Content-Type', 'application/json')
    .body([
       summary: "My Example Summary"
]).asString()

// this is to log the request, if it was successful, because sometimes it can fail
assert response.status == 204

This is the Easy for Jira Equivalent

issue.set("summary", "My Example Summary")

Now let’s consider I want to search for issues using JQL with Scriptrunner.

def issues = []
def startAt = 0

while (true) {

    def result = get('/rest/api/2/search')
        .queryString('jql', jql)
        .queryString('startAt', startAt)
        .queryString('maxResults', 100)
        .asObject(Map).body
        
    issues.addAll(result.issues)

    if (issues.size == result.total) {
        break
    }
    else {
        startAt += 100
    }
}

And the Easy for Jira Equivalent is →

issues = api.search_issues("your query here")

Really wanted to have a comment about this, but to summarize, the excess of code, makes it harder to maintain, harder to read, and too intimidating, but you can take your own conclusions.

Conclusion

Using Python on your Jira instance via Easy for Jira will save you a lot of time due to the development of the app being made around our North Star, the reduction of the lead time for consulting and Jira admins. Our sole focus is to be able to deliver with Easy for Jira, any functionality in less than 50 lines of code and in less than 8 hours (even for more bad ass implementations).

Our app is considerably cheaper than our biggest competitor, at least 68x times faster and code complexity is less than 1% as our code is really readable and any person that can read can understand and also program on it. To help with that we’ve developed the Zero to Hero Guide.

We are continually adding more integrations and features to enhance even more the possibilities for our users. Our long term goal is to become the Industry Standard for coded automation so you can be sure the development will be based on user input, we want to make the better product around, with no room for competition.

Hope you liked the post, if so, spread the word, we want early adopters and we will support you in your brief learning journey, I see one can easily master the app in less than a week by following the Zero to Hero guide, so good luck and goodbye!

st,small,507x507-pad,600x600,f8f8f8-20240416-180747.jpg

Best,

Nivaldo Georg Junior
Product Owner in Easy for Jira

Hey there!

Today’s post focuses on savings generated by automation. Automation and savings are eternal bound together, if you are automating something in the first place is because you do care about time (which is also money) and you also care with the outcome of certain task, which while a computer is logical, your result will always be what you coded it to be.

The approach I’ll try to gather with this is the following, lets assume you are a project manager and the main task in your day should be dealing with your team and gathering information from stakeholders to make your plans better, but you do spend too much time planning issue deadlines (just an example).

Let’s consider your flow consists in.

  1. Create an Epic

  2. Create the Issues

  3. Assign the start/end dates in your issues

  4. Add your story points

  5. Have a meeting with your team to set expectations for that epic, dates, everything.

I would assume that the part that will take the most time will be setting dates, due to customer expectations and overall team availability.

Now let’s consider another scenario, where you create the epic and child issues and just set story points based on overall noted difficulty and the start and end dates in the epic, and leave it up to automation to auto assign the start and end dates of the issues.

That would be fine wine, wouldn't it? Yeah, I will not provide you with the code for that, but I can assure you that’s achievable by Easy for Jira in a few lines of code.

I’ll not focus that much in coding, but in the actual expense of being part of this flow.

Let’s consider the hourly rate of this Project Manager is $75 and for the process of managing that flow it takes around 2 hours a month. That is for one team.

Now let’s consider you do have 15 PMs.

In a month, you will be spending at least 30 hours managing this flow, which in numbers translates to:

15 * 2 * 75 = USD 2250 monthly, now yearly that translates to USD 27k In spending, to manage something that has potential to be automated.

Now let’s not be fools, this is really not savings, this is redirecting expenses to where it makes sense, the PMs will still be allocated, but now they can be performing more strategic actions, be more in touch with stakeholders, taking a better care of the team’s mental health, instead of clicking around generating minimal neuron activation.

Untitled-20240411-122117.jpg

To reach this approach in more detail in your corporation, try to make it as a everyday exercise - look into a task, understand what is being done and create the mindset to think a way to automate it, then try to estimate how much time that task takes, you can even perform it once for yourself and time it.

IF you do have that number, X seconds, X minutes, X hours, etc. you can start evaluating how much the company spends with the task and come up with a solution that will generate long lasting savings, because even if a process takes as much as USD 500 monthly, that means 6K a Year and 60K in 10 years, so cut the unnecessary steps of your company, everything that don't require human critical thinking to be done, should not be done by humans.

Automation is something I’m very fond with, because I know that the stuff that needs to be done, is being done behind the curtains while I can focus on other tasks, or creating more automation, that generates more time availability and so on and so forth.

Thanks for reading!

Best,

Nivaldo Georg Junior
Product Owner in Easy for Jira

I hope this post has generated at least 1 neuron activation.

Become an EFJ Champion

Ready to revolutionize your automation stack? Let's dive into Python within Jira.

Tired of spending hours on repetitive tasks that could easily be automated? Are you ready to streamline your workflow and reclaim your time for more meaningful work? Then it's time to explore Python development within your Jira instance.

In today's fast-paced world, efficiency is key. By learning Python development for Jira, you'll be equipped with the tools to automate tedious processes, freeing up your time for tasks that truly matter.

Imagine a world where you no longer have to manually input data or perform calculations. With Easy for Jira's Python stack, you can create customized workflows that handle these tasks automatically, allowing you to focus on higher-level problem-solving and innovation.

But this isn't just about making your own life easier – it's about driving real change within your organization. By embracing automation, you'll not only boost your own productivity but also contribute to your team's overall efficiency and success.

So why wait? Start your journey into Python development for Jira today and discover a world of possibilities. Whether you're a seasoned Jira administrator or a newcomer to the platform, there's never been a better time to learn.

Don't let manual tasks hold you back any longer. Take control of your workflows and unlock your full potential with Python and EFJ.

Join us and be part of the future of work, take our Zero to Hero guide, code along, and be a champion!

Zero to Hero Guide

From October 3rd, 2023, Automation for Jira entered a limited use tier, forcing some of the cloud standard customers to a rough decision, either you upgrade to premium or you lose your functionality.

The alternative to that would be getting an app, as the pricing change in Jira goes from more than $2 per user and app usually costs $1 < per user, with a decaying price for the higher user tiers.

Now, can premium make up for the bump in price? Probably not. You still get good and old Jira, with some more AI and 1000 Automation runs per user, which makes it harder to hit the ceiling when dealing with automation, is it worth the price bump in licenses? again, probably not.

There are a few contenders to close this cycle and to generate value for customers, but Easy for Jira has the lowest entry barrier of them all, it’s a Python based app that you can easily scale to global listeners or post functions, which will give you a greater range on integrations, something that Jira Premium provides, but it’s the old way, the connection is hard and maybe won’t work as expected.

To make a simple integration with Easy for Jira you can do as follows:

  1. Go to Code Repository

  2. Give your file a readable name, a filename (ending with .py), some documentation for future maintenance and the code itself.

Name

My Test Integration

Filename

my_integration.py

Documentation

testing the integration

  1. I can’t exactly give the integration as I don’t know what you are integrating, but a simple example follows:

import requests

class MyIntegration:
    def __init__(self, base_url, api_key):
        self.base_url = base_url
        self.api_key = api_key

    def get(self, endpoint, params=None):
        headers = {
            'Authorization': f'Bearer {self.api_key}',
            'Content-Type': 'application/json'
        }
        response = requests.get(f'{self.base_url}/{endpoint}', params=params, headers=headers)
        if response.status_code == 200:
            return response.json()
        else:
            logger.error(f"Failed to fetch data from {self.base_url}/{endpoint}. Status code: {response.status_code}")
            return None

    def post(self, endpoint, data):
        headers = {
            'Authorization': f'Bearer {self.api_key}',
            'Content-Type': 'application/json'
        }
        response = requests.post(f'{self.base_url}/{endpoint}', json=data, headers=headers)
        if response.status_code == 201:
            return response.json()
        else:
            logger.error(f"Failed to post data to {self.base_url}/{endpoint}. Status code: {response.status_code}")
            return None

integration = MyIntegration("http://yourendpoint.com", "<your api key>")
  1. Go to one of your workflows.

  2. Add Post Functions in the status transition you need the integration running

  3. In there you do the following:

    import my_integration
    
    data = integration.get("/yourEndpoint/10203")["data"]
    issue.set("customfield_10203", data)

Consider that the endpoint /yourEndpoint/10203 will return data to be put in the field customfield_10203

That’s something you can do with webhooks, its a bit harder and you can’t reuse, you have to copy it and paste it over and over again in automation, but is it worth it paying JSM premium to have this functionality?

The point is, you can be paying less for more functionality, Python is the way to go when dealing with automating boring and repetitive stuff, and here at Easy for Jira we work hard to provide a lot of ready to use wrappers, so you don’t need to code a lot, just enough.

If you need more information about the app, don’t be shy, open a ticket with us at the portal!

Machine work is the nomenclature I use to take when dealing with problems that take too much time, are too boring, are even sometimes too hard, are being performed by people and should be done by machines.

The first symptom someone that is performing Machine Stuff related work experiences is that you will be bored out definitely in a few days. If you are performing repetitive steps on your company, using ctrl + c and ctrl + v to get information from a field and put it into another, your company is losing time and you are losing your mental health, while you could be doing stuff machines are not yet good doing.

purepng.com-terminatorterminatorscience-fictionactionfilmjames-cameronthe-terminatorarnold-schwarzeneggercyborgsarah-connor-1701528658823qeqjn-20240404-171419.png

AI In the 21st century, a menace to human purpose

The human battle of the 21st century will be finding roles that you should not be putting machines to work and putting people instead. Every other day a new solution is developed to solve a problem that is usually solved by people that spent a lifetime perfecting that trade. Which is sad, because that guy really put some effort on it and in certain cases, there’s not much ways around it.

The only way to keep this person occupied is via some sort of symbiotic relationship between those masters of trade and the automated medium, which is in some cases, a robot or just a server processing stuff. The way this symbiosis can work is if the masters gain a certain aptitude in understanding what the machine could be doing better and giving it more input to reach some level of perfection, something that humans are not really good in reaching themselves.

This could work well when you stop to think that the developers that created the machines, had thousand of hours in development knowledge, not in the actual craft they worked to automate, so they don’t know some of the specifics involved in a perfect product. Japanese people are specifically good with a variety of trades that can for sure be automated, but the art will be lost, the tradition will be lost and for them, their life purpose will go with it, to give someone a purpose in this scenario, is only by giving the master of that trade, a chance of input in the machine creation, with the final goal of perfecting it.

Now pulling this to our ecosystem. This part is for you Jira Admin!

There’s always room for automation in Jira Instances, mostly in big and boring process, but you can help with that in a very smart way, while getting points with your managers or with your coworkers.

If you ask around, someone will always have something that could be better in their process, usually the person that is doing that specific part of the work is the specialist of that problem which you can help solving.

Let’s create a very simple scenario. Math.

Math is something that computers can do very well, but I’ve seen teams of engineers that will fill a Jira Issue with all the variables they need for a project and calculating that manually, while they could have a single “Factory Project“ ready for the task, with 1 Issue type specialized for certain type of services where in a certain point of the process (Workflow) you can calculate everything based on some boundaries.

This would free a team of specialized workforce of doing the complex task of calculating everything and putting them to work more as specialized analysts, they can focus on solving the other side of the business, understanding what they could be improving, where to save costs, where to be more effective.

Easy for Jira is a strong contender for this automation part, with the ease of development for teams of any size and of any market. As our main goal is to reduce complexity for tasks, you could configure your workflows to calculate every aspect of a construction in a certain point of the workflow via our specialized Python Post Functions stack.

But chillax my friend, I’m not here to sell you anything, just think on how saving time with automation could benefit you, and your stakeholders, this post was to open your eyes that automation is here to stay. Either you work with it, or it will work without you.

Create the mindset of creating value to your business and you will never run out of things to do.


Easy for Jira documentation was migrated to Confluence to better fit our needs and the Atlassian Stack, also to provide best examples and more integration with our own tools.

https://easyforjira.atlassian.net/wiki/spaces/Documentation


If there are any example usages you need, feel free to reach out in our portal!