Commit 46ba6d7
feat: delete OpenProject tickets when creation criteria is no longer satisfied (#1)
feat: delete OpenProject tickets when owner becomes unmapped
When a Zammad ticket's owner changes to someone who is not in the
ASSIGNEES mapping, the corresponding OpenProject work package is now
deleted. This maintains consistency with the creation rule that
prevents creating tickets for unmapped owners.
The deletion logic:
- Checks if an existing task has an unmapped owner
- Deletes the OpenProject work package via DELETE API call
- Returns early to prevent the update logic from running
- Logs the deletion with owner ID for debugging
This ensures that tickets only exist in OpenProject when they meet
the same criteria required for creation (owner must be mapped).
Co-authored-by: Claude <[email protected]>1 parent dbfa756 commit 46ba6d7
1 file changed
+22
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
114 | 136 | | |
115 | 137 | | |
116 | 138 | | |
| |||
0 commit comments