One of the most frustrating things about Jira as an admin are the surprising little gaps that catch you up and end up requiring a Marketplace Partner to fill in the gaps - too early. Marketplace Apps are awesome and incredibly powerful, but if your company ends up buying too many too early, you will absolutely turn the company against them if you don't have high product usage.
It's crucial that Atlassian products remain affordable and effectively scalable as organizations onboard into them.
This, my friends, is where Forge comes in. You can build all sorts of solutions to user needs so quickly - and without having to host anything!
LOOK AT THIS!!!!
SO.
My favorite example, and one that you've definitely run into as an admin or a user is the first time someone comes to you and says, “I want to require a comment when someone transitions from X to Y.”
"Okay," you think. "No problem. This must be possible out of the box!" So you go looking for it.
You look in the UI. Can't find it.
You read the docs. Nothing.
You search the internet. Lots of dead ends.
You go to this site we're on right now, and you're certain this will be where you find the answer. You've found so many other amazing answers by Champions and other users here before! So you do your search, and after about the fifth page of search results and reading the same answers over and over, it hits you.
There's no way to do this with OOB Jira. In 2025.
You're shocked. Flabbergasted, even. But, you know these people know what they're talking about, so you trudge over to the Marketplace to see what's on offer!
What. What. $3000? $4000? For a 200-person company, where only one workflow in one project needs it? Well, that's not gonna fly. Not yet. The company only started using Jira a couple years ago, and there's a lot of folks barely using it. That $3000 app? That's 20% of what your company is paying for all of Jira.
So what do you do?
You write a Forge app.
I know, I know. You're not a developer. But listen. Listen. Between the new Get the most out of Forge Learning Path, Forge Quest, the Forge tutorials & guides, sample apps, and the new and improved Atlassian Developer YouTube channel, you'll be an expert in no time.
Here. I'll show you just how easy it is to solve our problem:
From start to finish, here we go!
Your manifest.yml will currently look like this:
modules:
jira:workflowValidator:
- key: comment-required-validator
name: Comment Required Validator
description: Ensures a comment is provided during transition
permissions:
scopes:
- manage:jira-configuration
- read:jira-work
app:
runtime:
name: nodejs22.x
memoryMB: 256
architecture: arm64
Now, after the description, configure the Jira expression validation logic:
The expression checks if a new comment has been added during a transition. Here’s how to implement it:
let currentComments = issue.comments.length;
let originalComments = originalIssue.comments.length;
let hasNewComment = currentComments > originalComments;
hasNewComment ? true : 'A comment is required to complete this transition.';
Now to put the whole thing together:
modules:
jira:workflowValidator:
- key: comment-required-validator
name: Comment Required Validator
description: Ensures a comment is provided during transition
expression: |
// Check if the last comment was added during this transition
// by comparing the issue's current comments with original comments
let currentComments = issue.comments.length;
let originalComments = originalIssue.comments.length;
let hasNewComment = currentComments > originalComments;
// Return true if new comment exists, otherwise return error message
hasNewComment ? true : "A comment is required to complete this transition"
permissions:
scopes:
- manage:jira-configuration
- read:jira-work
app:
runtime:
name: nodejs22.x
memoryMB: 256
architecture: arm64
Now, head to a workflow, configure your validator, and test it!
VOILA!!!!
You've just written your first Forge app and saved your company a bunch of money. Go forth and be a badass!
Learn more about Atlassian Forge here: https://developer.atlassian.com/platform/forge/
Any questions?
Bryan Guffey
Atlassian Administrator
Sonos
Southern California
5 comments