Closed Sh1d0w closed 5 years ago
@epicfaace I'm having a similar issue updating nested dependencies. Here's my code:
{
"type": "object",
"title": "Jira schema",
"properties": {
"summary": {
"type": "string"
},
"description": {
"type": "string"
},
"project": {
"type": "string",
"enum": [
"BE",
"FE"
],
"enumNames": [
"Backend Sprint",
"Frontend Sprint"
],
"default": "BE"
}
},
"required": [
"project"
],
"dependencies": {
"project": {
"oneOf": [
{
"properties": {
"project": {
"enum": [
"BE"
]
},
"issuetype": {
"enum": [
"10001",
"10002"
],
"enumNames": [
"Task",
"Story"
],
"default": "10001"
}
},
"required": [
"issuetype"
]
},
{
"properties": {
"project": {
"enum": [
"FE"
]
},
"issuetype": {
"type": "string",
"title": "Issue Type",
"enum": [
"10003",
"10004"
],
"enumNames": [
"Epic",
"Bug"
],
"default": "10003"
}
},
"required": [
"issuetype"
]
}
]
},
"issuetype": {
"oneOf": [
{
"properties": {
"priority": {
"enum": [
"1",
"2",
"3"
],
"enumNames": [
"High",
"Medium",
"Low"
],
"default": "1"
},
"issuetype": {
"enum": [
"10001"
],
"enumNames": [
"Task"
]
}
}
},
{
"properties": {
"priority": {
"enum": [
"2",
"3"
],
"enumNames": [
"Medium",
"Low"
],
"default": "2"
},
"issuetype": {
"enum": [
"10002"
],
"enumNames": [
"Story"
]
}
}
},
{
"properties": {
"priority": {
"enum": [
"3"
],
"enumNames": [
"Low"
],
"default": "3"
},
"issuetype": {
"enum": [
"10003"
],
"enumNames": [
"Epic"
]
}
}
}
]
}
}
}
When I update project
, priority
won't get updated.
The main differences here is that I'm using enum
instead of oneOf
so not sure if that's the problem. But I am hoping to stick to enum
if possible. Appreciated if you can take a look at this. Thanks!
Prerequisites
Description
When there are nested dependencies, updating top most dependency does not properly update form data for the nested ones, resulting incorrect form rendering.
Steps to Reproduce
Expected behavior
Permitted Extension should be hidden and all form data related to those nested dependencies removed.
Actual behavior
Permitted Extension still shows and the value of update absences is in the form data
Version
1.3.0