@@ -43,38 +43,7 @@ export async function POST(request: Request) {
43
43
} , { status : updateResponse . status } ) ;
44
44
}
45
45
46
- // Fetch available transitions
47
- const transitionsResponse = await fetch ( jiraTransitionUrl , {
48
- method : 'GET' ,
49
- headers : {
50
- 'Accept' : 'application/json' ,
51
- 'Authorization' : `Basic ${ jiraAuth } ` ,
52
- } ,
53
- } ) ;
54
-
55
- if ( ! transitionsResponse . ok ) {
56
- return Response . json ( {
57
- error : 'Failed to fetch transitions' ,
58
- status : transitionsResponse . status ,
59
- statusText : transitionsResponse . statusText ,
60
- } , { status : transitionsResponse . status } ) ;
61
- }
62
-
63
- const transitions = await transitionsResponse . json ( ) ;
64
- console . log ( "Available transitions:" , transitions ) ;
65
-
66
- // Find the "In Progress" transition
67
- const inProgressTransition = transitions . transitions . find (
68
- ( t : any ) => t . name === "In Progress"
69
- ) ;
70
-
71
- console . log ( "=============inProgressTransition" , inProgressTransition )
72
-
73
- if ( ! inProgressTransition ) {
74
- return Response . json ( { error : 'In Progress transition not found' } , { status : 400 } ) ;
75
- }
76
-
77
- // Then, transition the issue to "In Progress"
46
+ // Transition the issue to "In Progress" using the known transition ID
78
47
const transitionResponse = await fetch ( jiraTransitionUrl , {
79
48
method : 'POST' ,
80
49
headers : {
@@ -84,7 +53,7 @@ export async function POST(request: Request) {
84
53
} ,
85
54
body : JSON . stringify ( {
86
55
transition : {
87
- id : inProgressTransition . id
56
+ id : "21" // Hardcoded "In Progress" transition ID
88
57
}
89
58
} ) ,
90
59
} ) ;
0 commit comments