Cannot create 5-ditig string for Bug issuetype

Issue #92 resolved
Michael Voronkov created an issue

Hi Fidel,

I am having hard time figuring out the correct syntax for 'Validation based on JQL query' validator. My goal is to make custom field Environment be required during Bug creation (not req'd on all other issuetypes) Here's my JQL: issuetype = bug and cf[10403] = NULL

What it needs to look like is this: issueType = %{nnnnn} and %{10403} = NULL

Question: Which 5-digit string should I use for bug? Its Jira ID is "1" ?

Comments (5)

  1. Fidel Castro Armario repo owner

    You can force the field "Environment" to be set for issue types "Bug" using "Boolean validator with math, date-time or text-string terms" with the following configuration:

    conf-1.png

    Expression used is: %{00014} = "Bug" IMPLIES %{00070} != null

    Notice that:

    • %{00014} is field code for "Issue type"
    • %{00070} is field code for "Environment"

    Once configured, transition "Create Issue" will look like this:

    conf-2.png

    Please, don't forget to close the issue if the solution is valid for you.

  2. Michael Voronkov reporter

    It worked. When would you recommend using "Validation based on JQL query" validator vs. "Boolean validator" one?

    Thanks for the help! Michael

  3. Fidel Castro Armario repo owner

    Currently Boolean validator with math, date-time or text-string terms is such a versatile and powerful feature that you can almost write any validator you may need with it.

    Using it you can write expressions that depends on linked issues, subtasks and other issues in your project, and its values. The only difficulty is that you may not know well the syntax, and typically everybody has some knowledge of JQL.

    As rule of thumb, you should always use Boolean validator with math, date-time or text-string terms when you want to implement a validation based on the values of current issue.

    When you want to implement a validation based on the values of other issues in your current project, or in all your JIRA instance, and you know how to write a JQL query for selecting them, you can use use Validation based on JQL query, but usually you can also use Boolean validator with math, date-time or text-string terms.

  4. Log in to comment