Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How I Used AI as a Co-Developer to Bypass "Required Field" Hell in ScriptRunner Cloud

Jeffrey Bistrong
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 Champions.
July 15, 2026

We’ve all been there. You’re building a complex hierarchy cloner in Jira Cloud using ScriptRunner. You write the code to duplicate Epics, Tasks, and Subtasks across projects. You run it, and... CRASH.

"Field 'customfield_XXXXX' is required."

So, you go into the Jira UI, check the Screen Scheme for that issue type, look up the Field Configuration, find the custom field ID, update your payload, and try again. Then, the next level of the hierarchy crashes because another field is required there.

Tonight, while building an advanced, multi-platform automation pipeline (linking Jira Cloud to Kantata APIs), I decided to stop fighting the Jira UI and try a different approach with AI.

The Strategy: The Diagnostic Feedback Loop

Instead of hunting for required fields manually, I established a three-step feedback loop with Gemini:

  1. The Diagnostic: I asked the AI to write a quick, lightweight diagnostic script to inspect the field metadata and target schemas for each issue type in our template project.

  2. The Output: I ran the diagnostic, gathered the raw JSON payload of required fields, and pasted it directly back into the AI.

  3. The Refactor: The AI instantly identified the missing required custom fields, generated the correct test payloads, and refactored my master cloning script in seconds.

The Win 🏆

By using the AI as an active diagnostic partner rather than just a code generator, we successfully built a ScriptRunner Listener that:

  • Generates dynamic, unique 3-letter project keys (with built-in deduplication loops if a key or project name is already taken).

  • Clones a deep hierarchy (Epics,Tasks,Subtasks) with zero schema validation errors because the required fields were pre-mapped by our diagnostic loop.

  • Gracefully handles failures by catching exceptions and writing a beautifully formatted Markdown error report directly as a comment on the trigger issue if anything goes wrong.

My Takeaway for the Community

If you are using generative AI for Jira administration or development, don't just ask it to write code.

Use it to build diagnostic tools. Let it read your API payloads, analyze the errors, and refactor your scripts. It turns what used to be hours of frustrating configuration hunting into a seamless, 5-minute feedback loop.

How are you all using AI to speed up your ScriptRunner or Jira Cloud development? Do you have any favorite prompt sequences for debugging API schemas? Let's discuss!

1 answer

1 vote
zoltanersek _outpostlabs_dev_
Atlassian Partner
July 16, 2026

I think you've hit on an important distinction: AI is much more effective when it's given evidence, not just a problem statement.

I've found that the best results come from feeding it the API response, stack trace, field metadata, or audit log and asking "what does this tell us?" rather than "write me a script that does X."

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events