@@ -198,7 +198,6 @@ export const JiraServiceManagementBlock: BlockConfig<JsmResponse> = {
198198 id : 'summary' ,
199199 title : 'Summary' ,
200200 type : 'short-input' ,
201- required : true ,
202201 placeholder : 'Enter request summary' ,
203202 condition : { field : 'operation' , value : 'create_request' } ,
204203 wandConfig : {
@@ -238,20 +237,23 @@ Return ONLY the description text - no explanations.`,
238237 title : 'Raise on Behalf Of' ,
239238 type : 'short-input' ,
240239 placeholder : 'Account ID to raise request on behalf of' ,
240+ mode : 'advanced' ,
241241 condition : { field : 'operation' , value : 'create_request' } ,
242242 } ,
243243 {
244244 id : 'requestParticipants' ,
245245 title : 'Request Participants' ,
246246 type : 'short-input' ,
247247 placeholder : 'Comma-separated account IDs to add as participants' ,
248+ mode : 'advanced' ,
248249 condition : { field : 'operation' , value : 'create_request' } ,
249250 } ,
250251 {
251252 id : 'channel' ,
252253 title : 'Channel' ,
253254 type : 'short-input' ,
254255 placeholder : 'Channel (e.g., portal, email)' ,
256+ mode : 'advanced' ,
255257 condition : { field : 'operation' , value : 'create_request' } ,
256258 } ,
257259 {
@@ -260,6 +262,16 @@ Return ONLY the description text - no explanations.`,
260262 type : 'long-input' ,
261263 placeholder :
262264 'JSON object of field values (e.g., {"summary": "Title", "customfield_10010": "value"})' ,
265+ mode : 'advanced' ,
266+ condition : { field : 'operation' , value : 'create_request' } ,
267+ } ,
268+ {
269+ id : 'formAnswers' ,
270+ title : 'Form Answers' ,
271+ type : 'long-input' ,
272+ placeholder :
273+ 'JSON object for form-based request types (e.g., {"summary": {"text": "Title"}, "customfield_10010": {"choices": ["10320"]}})' ,
274+ mode : 'advanced' ,
263275 condition : { field : 'operation' , value : 'create_request' } ,
264276 } ,
265277 {
@@ -571,8 +583,8 @@ Return ONLY the comment text - no explanations.`,
571583 if ( ! params . requestTypeId ) {
572584 throw new Error ( 'Request Type ID is required' )
573585 }
574- if ( ! params . summary ) {
575- throw new Error ( 'Summary is required' )
586+ if ( ! params . summary && ! params . formAnswers ) {
587+ throw new Error ( 'Summary is required (unless using Form Answers) ' )
576588 }
577589 return {
578590 ...baseParams ,
@@ -584,7 +596,22 @@ Return ONLY the comment text - no explanations.`,
584596 requestParticipants : params . requestParticipants ,
585597 channel : params . channel ,
586598 requestFieldValues : params . requestFieldValues
587- ? JSON . parse ( params . requestFieldValues )
599+ ? ( ( ) => {
600+ try {
601+ return JSON . parse ( params . requestFieldValues )
602+ } catch {
603+ throw new Error ( 'requestFieldValues must be valid JSON' )
604+ }
605+ } ) ( )
606+ : undefined ,
607+ formAnswers : params . formAnswers
608+ ? ( ( ) => {
609+ try {
610+ return JSON . parse ( params . formAnswers )
611+ } catch {
612+ throw new Error ( 'formAnswers must be valid JSON' )
613+ }
614+ } ) ( )
588615 : undefined ,
589616 }
590617 case 'get_request' :
@@ -826,6 +853,10 @@ Return ONLY the comment text - no explanations.`,
826853 } ,
827854 channel : { type : 'string' , description : 'Channel (e.g., portal, email)' } ,
828855 requestFieldValues : { type : 'string' , description : 'JSON object of request field values' } ,
856+ formAnswers : {
857+ type : 'string' ,
858+ description : 'JSON object of form answers for form-based request types' ,
859+ } ,
829860 searchQuery : { type : 'string' , description : 'Filter request types by name' } ,
830861 groupId : { type : 'string' , description : 'Filter by request type group ID' } ,
831862 expand : { type : 'string' , description : 'Comma-separated fields to expand' } ,
0 commit comments