You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

JIRA创建界面Summary字段验证规则异常问题求助

Fixing Jira Workflow Validator to Match "Test" Anywhere in Summary

Got it, let's resolve this issue where your Jira workflow validator only passes when the Summary is exactly "Test"—but you want it to pass whenever "Test" appears anywhere in the field. Here are two reliable solutions depending on your Jira setup:

Option 1: Use Jira's Built-in Text Field Contains Validator (Server/Data Center & Cloud)

This is the simplest approach if your Jira version supports it:

  • Navigate to your workflow editor and locate the transition where you've set up the validator.
  • Go to the Validators tab, then remove the existing exact-match validator for the Summary field.
  • Click Add validator, then search for and select the Text Field Contains validator (usually under the "Field validation" category).
  • Configure the validator:
    • Select Summary as the target field.
    • Enter Test in the "Text to contain" field.
    • If you want the match to be case-insensitive (e.g., pass for "test", "TEST", etc.), check the corresponding "Case insensitive" option.
  • Save your changes and publish the workflow to apply the update.

Option 2: Use a Groovy Script Validator (with ScriptRunner Plugin)

If you're using the ScriptRunner plugin (common for advanced Jira customizations), a short Groovy script will give you full control:

  1. In your workflow transition's Validators tab, add the Script Validator from ScriptRunner.
  2. Paste the following script into the editor:
// Get the Summary field value
def summary = issue.summary

// Check if Summary contains "Test" (case-insensitive)
return summary?.toLowerCase()?.contains('test')

// For case-sensitive matching, use this line instead:
// return summary?.contains('Test')
  1. Save the validator and publish the workflow.

Testing Tips

  • Test scenarios like:
    • Summary = "Test" (should pass)
    • Summary = "This is a Test Case" (should pass)
    • Summary = "test run" (passes if using case-insensitive match)
    • Summary = "Sample Case" (should fail)

内容的提问来源于stack exchange,提问作者Raju

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 10:14:14