Forums

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

Best practices or AI-based tools for writing accurate JMWE scripts

Sagi Gueta
Contributor
July 3, 2025

Hi everyone! 

I’m working with JMWE (Jira Misc Workflow Extensions) to implement conditions, validators, and post-functions across multiple workflows.

While the use cases are clear, I’ve found that writing accurate Groovy scripts or Jira Expressions within the JMWE context can be challenging for me.

To streamline the process, I’ve experimented with ChatGPT, Gemini, and Copilot, but the results are often hit-or-miss: sometimes helpful, but sometimes missing key syntax or context-specific details.

 

I’d love to hear from others in the community:

  1. Have you found effective ways to prompt AI tools (like ChatGPT, GitHub Copilot, etc.) to produce valid scripts for JMWE?

  2. Do you have a recommendation for a free AI tool that would be helpful in this topic?
  3. Are there prompt structures, templates, or workflows that help you generate cleaner, more reliable code?

  4. Any hybrid approaches where AI helps you get started, and you refine manually?

 

I’d really appreciate any practical tips or examples, especially if they helped reduce the trial-and-error process when scripting with JMWE.

 

 

Thanks in advance for sharing your experience!
Sagi

 

1 answer

Suggest an answer

Log in or Sign up to answer
1 vote
Brita Moorus
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.
July 8, 2025

Hi, @Sagi Gueta! 👋 

I've found similar pain points using AI for scripting. What helped me get better results from AI:

  1. Be really specific in your prompts and set clear intent and context.
  2. Mention field types, names (custom field IDs) and expressions you're using. This helps the model avoid generic errors.
  3. I use ChatGPT to get 60–70% of the way there, then tweak manually after checking the docs or running test workflows. It’s great for syntax, but not perfect for Jira-specific quirks.
  4. If you have Rovo enabled, it's Atlassian's AI has some understanding of context like workflow schemes and field configs. Not perfect, but better in some cases.
  5. I've built a prompt template that I reuse, like:
    “I’m working in Jira Cloud. Here’s what I want: [use case]. The field is [field type], and should only run if [condition]. Return just the Groovy script, nothing else. Use documentation from [link]”

 

Hope this helps! ✨

Sagi Gueta
Contributor
July 10, 2025

Thanks, that’s helpful!

I’ve tried similar things before, but I can see now that putting more thought into how I structure the prompt makes a difference, and I’m already seeing better output.

The reusable template idea sounds practical. I should probably start saving my own examples as I go.

By the way, do you have any tips for how you handle the last 30%, when it’s close but still needs fixes? Anything that helps you spot issues or get it production-ready?

Like Brita Moorus likes this
Brita Moorus
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.
July 12, 2025

That's such a great follow-up, @Sagi Gueta! 🙌

I totally agree - saving your own examples over time really builds a solid reference library (especially for tricky validators or multi-condition post functions).

For that last 30%, a few things help me:

  • Creating dummy issues in a test projects with all the fields I need and then testing my scripts and checking the logs for errors or unexpected behavior.
  • Breaking elements down into smaller parts - if some fields or smart values are not working as expected, I simplify the scripts to just output the values in the log - this helps me to confirm what's the issue about.

I'm still learning too, so if you come up with good templates or catch common mistakes, would love to hear them! 💙

DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events