Skip to content

Commit ca3a53a

Browse files
authored
Merge pull request #9 from hryshynr/patch-1
entity-state-status.md
2 parents bf7df2a + 38de15c commit ca3a53a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Jira JS Mappings/entity-state-status.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,21 @@ const result = destState
111111

112112
return result;
113113
```
114+
115+
Comparator:
116+
117+
```js
118+
const entityStateToStatusMap = new Map(
119+
[
120+
["Open", "Backlog"],
121+
["Planned", "Planned"],
122+
["In Progress", "In Progress"],
123+
["Coded", "In Progress"],
124+
["In Testing", "In Progress"],
125+
["Done", "Done"]
126+
].map(mapping => [mapping[0].toUpperCase(), mapping[1]])
127+
)
128+
const sourceState = args.sourceFieldValue.toolStringValue
129+
const targetStatus = entityStateToStatusMap.get(sourceState.toUpperCase())
130+
return targetStatus === args.targetFieldValue.toolStringValue
131+
```

0 commit comments

Comments
 (0)