How to add and maintain "Create Behaviours"?

How to add and maintain "Create Behaviours"?

1- GUI Handling

 

image-20240612-150138.png

 

Create Behaviours: This is an array of JSON objects, where each object represents a behavior action with four attributes.

You must verify the JSON according to JSON Schema in order to store behaviors.

2- JSON Schema

{ "$id": "http://json-schema.org/json/schema", "type": "array", "items": { "type": "object", "properties": { "fieldKey": { "type": "string" }, "display": { "type": "boolean" }, "automaticFillingOption": { "enum": ["constant_string", "source_field", "target_field", "source_issue_key"] }, "automaticFillingValue": { "type": "string" } }, "required": [ "fieldKey", "display", "automaticFillingOption", "automaticFillingValue" ] } }

 

Description

Properties

Type

Description

Properties

Type

Description

fieldKey

string (field key)

enter here the field id. It can be a system field or custom field.

The custom field Id must always start with customfield_ .

You can find the field Id by following steps in this page Get custom field IDs for Jira and Jira Service Management | Jira | Atlassian Documentation, i recommend option 2 in using API

display

boolean

If the value is false then the field will be hidden (mandatory field must be populated otherwise it will be shown).

supported fields:

  • summary

  • description

  • assignee

  • reporter

  • components

  • fix versions

  • labels

  • priority

  • checkboxes

  • date picker

  • date time picker

  • multi select

  • multi user picker

  • number

  • parent

  • radio buttons

  • single select

  • text field

  • url

  • user picker

automaticFillingOption

enum ["constant_string", "source_field", "target_field", "source_issue_key"]

constant_string: choose this option to populate the field with a fixed text.

source_field: choose this option when you want to populate the field with a value of field in the source issue.

target_field: choose this option when you want to populate the field with a value of another field in the “issue create modal” in real time.

source_issue_key: choose this option when you want to populate the field with the source issue’s issue key.

 

Coming Soon:

no_action: Planned : no pre-fill function.

automaticFillingValue

string (field key or value or emty)

if you choose source_field or target_field in automaticFillingOption, you have to enter the field Id in this property.

if you choose constant_string, you have to enter the fixed text in this property.

if you choose source_issue_key or no_action leave this property empty.

3- Eligible Behaviours

3.1 From Field of Source Issue to Field in Target Issue

image-20240613-104944.png the target custom field must be the same custom field id as the source.

 

To:

summary

description

assignee

reporter

components

fixVersions

duedate

labels

parent

priority

environment

checkboxes

multi select

user picker

paragraph

radio buttons

multi user picker

single select

number

url

text field

date time picker

date picker

From:

 

summary

OK

OK

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

description

 

OK

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

 

 

 

 

 

 

issuetype

OK

OK

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

 

 

 

OK

 

 

assignee

OK

OK

OK

OK

 

 

 

 

 

 

OK

 

 

OK

 

 

OK

 

 

 

OK

 

 

reporter

OK

OK

OK

OK

 

 

 

 

 

 

OK

 

 

OK

 

 

OK

 

 

 

OK

 

 

components

 

 

 

 

OK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

fixVersions

 

 

 

 

 

OK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

duedate

OK

OK

 

 

 

 

OK

 

 

 

OK

 

 

 

 

 

 

 

 

 

OK

OK

OK

labels

OK

OK

 

 

 

 

 

OK

 

 

OK

 

 

 

 

 

 

 

 

 

OK

 

 

parent

OK

OK

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

 

 

 

OK

 

 

priority

OK

OK

 

 

 

 

 

 

 

OK

OK

 

 

 

 

 

 

 

 

 

OK

 

 

environment

 

OK

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

 

 

 

 

 

 

checkboxes

 

 

 

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

 

 

 

 

 

multi select

 

 

 

 

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

 

 

 

 

user picker

OK

OK

OK

OK

 

 

 

 

 

 

OK

 

 

OK

 

 

OK