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 https://confluence.atlassian.com/jirakb/how-to-find-id-for-custom-field-s-744522503.html, 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

 

 

 

OK

 

 

paragraph

 

OK

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

 

 

 

 

 

 

radio buttons

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

 

multi user picker

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

single select

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

number

OK

OK

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

 

OK

 

OK

 

 

url

OK

OK

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

 

 

OK

OK

 

 

text field

OK

OK

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

 

 

 

OK

 

 

date time picker

OK

OK

 

 

 

 

OK

 

 

 

OK

 

 

 

 

 

 

 

 

 

OK

OK

OK

date picker

OK

OK

 

 

 

 

OK

 

 

 

OK

 

 

 

 

 

 

 

 

 

OK

OK

OK

source issue key

OK

OK

 

 

 

 

 

 

 

 

OK

 

 

 

OK

 

 

 

 

OK

OK

 

 

constant string

OK

OK

 

 

 

 

 

 

 

 

OK

 

 

 

OK

 

 

 

 

OK

OK

 

 

3.2 From Field of Target Issue to Field in Target Issue

 

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

 

 

description

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

assignee

 

 

 

 

 

 

 

 

 

OK

 

 

OK

 

 

 

 

 

reporter

OK

 

 

 

 

 

 

 

 

OK

 

 

OK

 

 

 

 

 

components

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

fixVersions

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

duedate

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

labels

OK

OK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OK

 

 

parent

OK

OK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OK

 

 

priority

OK

OK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OK

 

 

environment

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

checkboxes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

multi select

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

user picker

OK

OK

 

 

 

 

 

 

 

 

OK

 

 

OK

 

 

 

 

 

paragraph

OK

OK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

radio buttons

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

multi user picker

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OK

 

 

 

 

 

 

single select

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

number

OK

OK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OK

 

OK

 

 

url

OK

OK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OK

OK

 

 

text field

OK

OK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OK

 

 

date time picker

OK

OK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OK

OK

OK

date picker

OK

OK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OK

OK

OK

4- Examples

 

  • In this example the summary field will be populate with the value of summary field of source issue:

[ { "fieldKey": "summary", "display": true, "automaticFillingOption": "source_field", "automaticFillingValue": "summary" } ]

if we need to hide the field after populate it we need just to change the value of display to false:

[ { "fieldKey": "summary", "display": false, "automaticFillingOption": "source_field", "automaticFillingValue": "summary" } ]

 

  • In this example, we will populate a text field (custom field) with the value of summary field of source issue:

assuming that customfield_10337 is a text field:

 

  • In this example we will populate two fields (summary and description) in the same time with the value of summary field of source issue:

 

  • In this example we will populate a text field (custom field) with the value of summary field of target issue ( when we change the value of summary the value of text field will be change in real time):

assuming that customfield_10337 is a text field:

 

  • In this example, the summary field will be populated with the key of source issue:

 

  • In this example, the summary field will be populated with fixed text (“New Summary"):