@@ -177,8 +177,15 @@ public List<Predicate> triageGetStates() throws IOException, InterruptedExceptio
177177 }
178178
179179 public void triageUpdate (@ NonNull UUID projectId , String similarityId , String scanType , String state , String comment , String severity ) throws IOException , InterruptedException , CxException {
180+ triageUpdate (projectId , similarityId , scanType , state , comment , severity , null );
181+ }
182+
183+ public void triageUpdate (@ NonNull UUID projectId , String similarityId , String scanType , String state , String comment , String severity , String customStateId ) throws IOException , InterruptedException , CxException {
180184 this .logger .info ("Executing 'triage update' command using the CLI." );
181- this .logger .info ("Updating the similarityId {} with state {} and severity {}." , similarityId , state , severity );
185+ this .logger .info ("Updating the similarityId {} with state {} with customStateId {} and severity {}." , similarityId , state , customStateId , severity );
186+
187+ boolean emptyState = state == null || state .isEmpty ();
188+ boolean emptyCustomStateId = customStateId == null || customStateId .isEmpty ();
182189
183190 List <String > arguments = new ArrayList <>();
184191 arguments .add (CxConstants .CMD_TRIAGE );
@@ -189,8 +196,14 @@ public void triageUpdate(@NonNull UUID projectId, String similarityId, String sc
189196 arguments .add (similarityId );
190197 arguments .add (CxConstants .SCAN_TYPE );
191198 arguments .add (scanType );
192- arguments .add (CxConstants .STATE );
193- arguments .add (state );
199+ if (!emptyState ) {
200+ arguments .add (CxConstants .STATE );
201+ arguments .add (state );
202+ }
203+ if (!emptyCustomStateId ) {
204+ arguments .add (CxConstants .CUSTOM_STATE_ID );
205+ arguments .add (customStateId );
206+ }
194207 if (!StringUtils .isBlank (comment )) {
195208 arguments .add (CxConstants .COMMENT );
196209 arguments .add (comment );
0 commit comments