Hello,
I use the behaviour module of ScriptRunner on my Jira environment with 20 differents configurations.
I have two needs :
- I want to automate the association of a new project to a behavior according to the project category.
I have no idea how to do now, so if you have suggestion, you're welcome ! - I want to use behaviour API to add new mapping between project and configuration without erasing the current mapping
For the second subject, I saw that I can use the base-url/rest/scriptrunner/behaviours/1.0/config rest API, posting a new XML of my mapping but it's erasing the old one...
I found two other rest API but I don't find any documentation on them :
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"
}
}
]
}
"
Any suggestions ?
Thank in advance.
Best regards,
David