Can you use AI in your job?

ChatGPT (TB).png

Welcome to thejiraguy.com, the ultimate destination for all things giraffe-related! Here, we celebrate the beauty and majesty of one of the most beloved animals in the world. Our mission is to educate, inspire, and entertain anyone interested in giraffes, from the casual admirer to the dedicated enthusiast. So whether you're looking to learn more about these gentle giants, discover fascinating facts and trivia, or enjoy stunning photos and videos of giraffes in their natural habitat, you've come to the right place. So join us on a journey of discovery and appreciation as we explore the world of giraffes and all that makes them unique.

This, Jira Guys and Gals is what I got with the prompt "Write me an intro paragraph in the style of posts from thejiraguy.com." And we get...Giraffes. I don't think ChatGPT knows what thejiraguy.com is, which, honestly, I'm not sure if that makes me happy or sad.    

I'm sure you've seen at least a dozen pieces asking, "is ChatGPT/LLM/AI coming for your jobs?" That's not this post. For one, I am not qualified enough to speak on the economics of the situation. Any conclusion I draw would be flawed as I fail to grasp some fundamental part of the equation. 

You've probably seen your favorite creators using the tools to create whole content pieces, including voice and visuals. Fortunately, that is also not this post. Don't get me wrong, I've debated it, but as we've seen above, all I'm likely to get is a puff piece about Giraffes. Possibly interesting, but not exactly why you are here.  

No, I want to go one step further. This isn't a piece on how AI is going to replace you. Now, it's a piece about how you can partner with these new tools to make you better at your job. Don't get me wrong, it's an interesting time to be alive, but those who survive will be those who can adapt to using these tools to augment their work. So, let's see how you can use these tools to make your life much easier!

Documentation? Who Writes Documentation!?

This might be a little on the nose, as this website could be viewed as a giant documentation project. I've been known to copy & paste stuff from here into Confluence when writing my own end-user documentation. Why not? I (presumably) have the copyright holder's permission, and there is no need to write the same thing a second time, right?

But even that depends on someone (me) to have written it at some point, and I have yet to begin to cover every topic about Jira, let alone Confluence, Bitbucket, Crowd, and Trello...seriously, I can be here for a bit.

So why not have ChatGPT write it for you? In this case, I asked ChatGPT, "How do I search for issues in Jira?" and after a bit, it responded with this text:

jirasearch.png

Don't get me wrong; minor details are wrong here and there. For example, Step 2 mentions a "Search" button, but no such button exists on either Jira Cloud or Jira DC. But on the whole, it's close. It even has a call out for using JQL and the quick search bar - the former of which you can link to another page with how to use JQL. As a follow-up, I asked Chat GPT, "How do I write a JQL Search string for Jira?" But, again, minus the stumble in Step 2, it's right on the point.  

jqlsearch.png

Neo: "I know Groovy."

So, I'm not great at Groovy. I can get by, but definitely not writing many of my own scripts for Scriptrunner.

But, who says I have to? I gave ChatGPT a simple enough prompt: "Write a groovy script for Scriptrunner that grabs all issues where the environment field is populated and copies that field value into another field."

It took 30 seconds to come up with this, which looks correct on the whole. I'm still running it first in a well-backed-up non-prod, but it should work.  

import com.atlassian.jira.component.ComponentAccessor

def customFieldManager = ComponentAccessor.getCustomFieldManager()

// Get the Environment custom field
def environmentField = customFieldManager.getCustomFieldObjectsByName("Environment").first()

// Get the New Field custom field
def newField = customFieldManager.getCustomFieldObjectsByName("New Field").first()

// Get all issues where the Environment field is not empty
def issueManager = ComponentAccessor.getIssueManager()
def searchProvider = ComponentAccessor.getComponent(com.atlassian.jira.issue.search.SearchProvider.class)
def query = "Environment is not EMPTY"
def searchResult = searchProvider.search(query, ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(), com.atlassian.jira.web.bean.PagerFilter.getUnlimitedFilter())

// Loop through the issues and copy the Environment field value to the New Field
searchResult.getIssues().each { issue ->
    def environmentValue = issue.getCustomFieldValue(environmentField)
    issue.setCustomFieldValue(newField, environmentValue)
    ComponentAccessor.getIssueManager().updateIssue(ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(), issue, com.atlassian.jira.event.type.EventDispatchOption.DO_NOT_DISPATCH, false)
}

This isn't limited to Groovy, though. My friend, Jesse Wisener, generated this prompt to migrate issues between Jira instances in python. 

import requests
import json

# Set the Jira API endpoints for the source and target instances
source_url = "https://source-jira-instance.com/rest/api/2"
target_url = "https://target-jira-instance.com/rest/api/2"

# Set the Jira project key for the project you want to migrate
project_key = "PROJECT_KEY"

# Set the authentication credentials for the source and target instances
source_auth = ("source-username", "source-password")
target_auth = ("target-username", "target-password")

# Get all issues in the source project
source_issues_url = f"{source_url}/search?jql=project={project_key}&maxResults=1000"
while source_issues_url:
    source_issues_response = requests.get(source_issues_url, auth=source_auth)
    source_issues = json.loads(source_issues_response.text)["issues"]

    # Loop through the issues and migrate them to the target instance
    for issue in source_issues:
        # Get the issue key and URL
        issue_key = issue["key"]
        issue_url = f"{source_url}/issue/{issue_key}"

        # Get the issue details from the source instance
        issue_details_url = f"{source_url}/issue/{issue_key}"
        issue_details_response = requests.get(issue_details_url, auth=source_auth)
        issue_details = json.loads(issue_details_response.text)

        # Create the issue in the target instance
        create_issue_url = f"{target_url}/issue"
        create_issue_payload = json.dumps(issue_details)
        create_issue_response = requests.post(create_issue_url, auth=target_auth, data=create_issue_payload, headers={"Content-Type": "application/json"})

        # Print the result
        if create_issue_response.status_code == 201:
            print(f"Successfully migrated issue {issue_key} from {issue_url} to {create_issue_response.json()['self']}")
        else:
            print(f"Failed to migrate issue {issue_key} from {issue_url} to {target_url}. Reason: {create_issue_response.reason}")

    # Get the URL for the next batch of issues, if it exists
    source_issues_url = json.loads(source_issues_response.text)["next"]

So, congratulations. You no longer have to be a programmer to get basic things done. Is Scriptrunner exploring this to remove a roadblock from their (already popular) App?

Emails? Naw, you do it!

I hate writing emails, especially when I have to give people bad news like, "I won't do this because what you are asking is fundamentally flawed and, in general, is a bad idea." I'll spend an hour figuring out how to put that more tactfully. So what happens when I ask ChatGPT to write it for me? Well, it's a rather well-thought-out form letter that puts it much better than I could.  

Dear [Requester],

I hope this email finds you well. I appreciate your request for me to perform [the task requested]. However, after careful consideration and analysis, I have come to the conclusion that performing this task may actually cause issues with Jira in the long run.

I understand that [reasons for request]. However, given the current state of Jira, performing this task would [describe potential negative impact].

Therefore, I regret to inform you that I will not be able to fulfill your request. I understand that this may not be the response you were hoping for, but my priority is to ensure the stability and functionality of Jira for all users in the long term.

Thank you for your understanding and cooperation in this matter. Please let me know if you have any further questions or concerns.

Best regards,

[Your Name]

I'm not joking; if left to my own devices, nothing I come up with would likely be that well done. I tend to be a bit blunt when dealing with end-users, so having a tool that helps me be gentler will be a great thing. 

TL;DR: What does this all boil down to?

It's easy to say the sky is falling. But honestly, it will only fall on those who refuse to adapt to changes. We've all been willing to learn new skills to accomplish more - which is usually how we find ourselves becoming Jira Admins in the first place. This is just another adjustment. Will it change everything about how we do things? Possibly, but likely not. Can we slot it here and there to make the boring jobs less time-consuming? Absolutely!  

So now, the sky is not falling. We need to keep on learning!

What do you think?

Are you scared about the impending AI revolution? Have you tried using these new tools in your work? I want to hear from you! Please leave a comment with your thoughts, concerns, and questions!

A Note here before we sign off entirely. I am happy to announce that Old Street Solutions will sponsor this year's Team 23 coverage! What does this mean? For one thing, we will have coverage from all the Keynotes, as I'm sure you have come to expect. But furthermore, you will actually meet me at the Old Stree Solutions Booth! We are still hammering out the details, but I most look forward to meeting many readers for the first time!

Also, Old Street's own Fun Man Andy is starting his America's Tour on his way to Team 23 soon, and if you manage to get to an event he's speaking at, you can get new thejiraguy.com SWAG. Keep an eye on my Twitter account, I'll be retweeting events as they are announced!

Of course, you can find my Twitter and other Social Media links on Linktree. Be sure to like, comment, and share my posts to tell the algorithms to show it to more people! 

But until next time, my name is Rodney, asking, "Has ChatGPT Updated your Jira issues for you today?"

10 comments

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 29, 2023

Sadly, no.  We've run ChatGPT over 400ish questions, 50ish of them about coding for Jira, and it's miserable.

It only got one (non coding) answer even vaguely right, and that's after we refined the question three or four times.  Coding-wise, it looks ok at a glance, but we quickly realised it was quite subtle in doing things slightly wrong (or horribly inefficiently), and worse, inventing functions and libraries that just are not there.

It clearly has no idea what the applications are for, how they work, and it certainly has no clue that Cloud and Data Center are not the same thing.

Don't get me wrong, I'm not saying it can't do it.  I think it just hasn't been trained on the right data yet.  It's not ready to work with specialised areas.  But it could be useful for the more simple tasks, with the right training.

Like # people like this
Reece Lander [ScriptRunner - The Adaptavist Group]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 30, 2023

Hey Rodney,

Jamie replied on the original post on your site yesterday, but I just spotted this and thought I’d reply here too and add a little more context around what Nic has said above.


Is ScriptRunner exploring this to remove a roadblock from their (already popular) App?


The answer to this is a big yes; we are actively working on ways to reduce the scripting barrier. We’ve recently introduced HAPI to ScriptRunner for Jira Data Center, which is a stripped-down API optimised for common Jira scripting use cases.

In terms of exploring large language models - like most of the rest of the world ;) - there’s lots of this happening across Adaptavist at the moment. Without a custom prompt, the model is limited to knowledge of ScriptRunner from a couple of years ago... the script it gave you is okay as a starting point, but not necessarily a smart, production-safe script, as Nic alludes to.

It uses PagerFilter.getUnlimitedFilter(), which will retain all issues in memory, possibly causing an OutOfMemoryError. The other thing it gets wrong is that environment is not a custom field. Still, not bad, but a way to go yet on training its understanding. With recent ScriptRunner versions you can use HAPI, like so:


Issues.search(‘environment is not empty’).each {
issue -> issue.update {
setCustomFieldValue(‘FreeTextA’, issue.environment)
}
}


Internally, this will load issues into memory from the Lucene index in batches... so will have constant memory, no matter how many issues you have.

That said, in the ScriptRunner team we’re getting very good results with a customised prompt. Our support department are already making use of it with some success, and as soon as we think it’s useful and stable we will announce something properly.

For more information see:

Like # people like this
Reece Lander [ScriptRunner - The Adaptavist Group]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 30, 2023

Whilst it is true that ChatGPT has poor broad knowledge of ScriptRunner, especially new features such as HAPI, it is possible to give the model access to new information.

For fun, I took the exact question you asked ChatGPT @Rodney Nissen and fed it into an experimental tool we are trialling internally, this is the result:

Screenshot 2023-03-30 at 17.13.31.png

The variable declaration is helpful, but not necessary. Luckily we can negotiate with GPT about this:

Screenshot 2023-03-30 at 17.17.03.png

 

I don't want to give too much away just yet ;)

If you happen to be at Team23, you may want to head on down to my HAPI talk, or drop by the ScriptRunner booth.

Things are about to get very interesting.

Like # people like this
Nikki Zavadska _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 30, 2023

It's really good for creating documentation or any kind of content like for example release notes, improving UX copy in the apps, websites and so on 😊 I love ChatGPT so much 😅

Like Nic Brough -Adaptavist- likes this
emily April 20, 2023

I think anyone can use AI in their job. Chat GPT is wonderful and I use it every day. That said, it have some security concerns if you're using it to write emails or meeting summaries for your business. We're building an AI Scrum Master leveraging OpenAI API that automates repetitive scrum master tasks like sharing meeting summaries, following up on action items, updating your board, and writing stakeholder summaries. I think a lot of the painful repetitive work we do is going to get automated faster than we think. You can check out the beta at Spinach.io 

Michael -Get Report- May 4, 2023

I'm not sure about Scriptrunner's Groovy level of coding, but more widespread things the chat gpt codes perfectly!

e.g. I was trying to spin up a website with Hugo CMS and it was the first evening I touched it.

ChatGPT saved me ton of time for reading documentation etc - it offer me a ternimal commands, code snippets and general structure of the product.

Make no mistake though - it only should be used in GPT 4 to produce meaningful results.

@Nic Brough -Adaptavist- what model did you tried?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 4, 2023

@Michael -Get Report- - no.  Nope, nopeity nope nope.

For the last four months, I've been paid my salary by having to correct ******* awful code written by GPT.  It's a sodding nightmare, GPT and the others have no idea.  I really want them to stop, so I can go back to doing a real job.

Stop it.  It's wrong.  But that is highly qualified.  ChatGPT is dreadful.  Until it is trained on the right data.  When it has the right training, it's great.

Adaptavist are building that training into Scriptrunner, and have also built HAPI to make it a LOT easier to code in SR (for server/dc at least, we want to take it to Cloud, and when we do, have an AI helper for it)

I've tried OpenAI, LLaMA and a couple of others, and not one of them understand the human problems we have.  I see the potential, but they are not ready.

Michael -Get Report- May 4, 2023

Alright, man! I want touch this topic anymore, promise :)
I really sorry you had a bad experience with it.



I really like what GPT4 can produce and as a matter fact is able to accelerate the boring work for me personally. So weird it had such a negative impact on yours.

 

Anyway, you guys build cool things in Adaptivist, so as the wise people say - don't touch if it works.

Iryna Komarnitska_SaaSJet_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 11, 2023

Our SaaSJet team is actively researching AI and its capabilities.
For example, GPT-3 has been implemented in the Email&Tasks: Jira Cloud for Gmail add-on.

Also, the Smart search function that converts a natural language query into JQL is based on AI.

Therefore, I invite you to use the app and await your feedback.

Pablo Beltran _Marketplace Expert_ November 23, 2023

From some days ago, I  try to use only ChatGP as much as possible for my daily Jira work.

It is an experimental exercise, of course, as my organization is preparing for the future. We think in less than 5 years (maximum) everything will be driven or assisted mainly by AI.

As oposite to some comments here, our experience with AI has been very positive. And it reaffirms us even more that a big change is coming fast and firmly.

This is the briefing of our success history:

As fine-tuning ChatGPT (and most LLMs) is all about having a good training dataset, we realized we could not afford it. It was going to be very laborious and expensive because our organization did not have those resources and budget.

Therefore, we used a very different approach: we created a SQL database emulator for Jira Cloud first! 

Once we were able to use SQL to fetch any Jira data, we wrote thousands of SQL queries to fine-tune ChatGPT to teach AI to code SQL in the way we needed.

If some one is interested in this experiment, you can try it by yourself as we have published it for Codegiest first and the Marketplace later.

It is still in a very preliminary stage (1st beta version!), but IMHO it gives a good idea about how this kind of AI integrations will work. I do not know Atlassian Intelligence yet, but according to their advertisements, surely they will release something similar.

For the curious: search for "Ask Jira" on the Marketplace and install it. It's free! (we pay ChatGTP ;-). We do not want money. Your feedback is be much more valuable! Thanks in advance to anyone participating in this experiment.

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events