Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-80310

Can't use non-existent custom field in FieldRequiredValidator validator on workflow creation

XMLWordPrintable

      Issue Summary

      When using a built-in field (such as summary or description fields) it works great.

      When key of the field is used, workflow is successfully created but Validation is wrong in settings : “(no field selected)” is indicated.

      Steps to Reproduce

      Trying to execute POST request for /rest/api//3/workflow:

       { "name": "Workflow1", "description": "Workflow1", "statuses": [ {"id": "10002" }, {"id": "10003" 	}, {"id": "10004" }, {"id": "10005" }, {"id": "10006" } ], "transitions": [ {"name": "Asked","from": [],"to": "10002","type": "initial" }, {"name": "Ask validation","from": [ "10002"], 	 "screen": { "id": "10003"},"rules": { 		 "validators": [{ "configuration": { "ignoreContext": true,"errorMessage": "At least one mandatory","fieldIds": ["customfield_10048"] }, "type": "FieldRequiredValidator"} ]},"to": "10003","type": "directed" } ] } 

      Expected Results

      Successful response.

      Actual Results

      Returns:

      {
          "errorMessages": [
              "Fields [customfield_10048] not found."
          ],
          "errors": {}
      }
      

      Workaround

      Create the custom field before updating the workflow. The custom field must be available in Company managed projects.

              Unassigned Unassigned
              tzasada@atlassian.com Tomasz Zasada
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: