Hello
I woud like to create a listener that will update the behaviour mapping when a project is created (according to its category).
Could you help me ?
I ever tried to this by API but I don't know how they work.
With the following API :
- base-url/rest/scriptrunner/behaviours/1.0/admin/mapping
- base-url/rest/scriptrunner/behaviours/1.0/admin/behaviour
I Tried to post the following Json, but it doesn't work...
"
{"id" : 1,
"name": "Behavior1",
"description": "test",
"mappings": [
{
"type": "PROJECT",
"project": {
"id": 20000,
"name": "Project 1",
"key": "P1"
},
"issuetype": {
"id": "0",
"name": "All issue types",}
},
{
"type": "PROJECT",
"project": {
"id": 20002,
"name": "Project 2",
"key": "P2"
},
"issuetype": {
"id": 12200,
"name": "Work Item"
}
}
]
}
Best regards,
David