17
17
import stroom .pipeline .shared .stepping .StepType ;
18
18
import stroom .pipeline .stepping .client .event .BeginPipelineSteppingEvent ;
19
19
import stroom .task .client .TaskMonitorFactory ;
20
+ import stroom .util .client .Console ;
20
21
import stroom .util .shared .DefaultLocation ;
21
22
import stroom .util .shared .TextRange ;
23
+ import stroom .util .shared .UserRef ;
22
24
import stroom .widget .popup .client .event .RenamePopupEvent ;
23
25
import stroom .widget .popup .client .event .ShowPopupEvent ;
24
26
import stroom .widget .popup .client .presenter .PopupSize ;
@@ -154,10 +156,11 @@ private void openAnnotation(final String href, final TaskMonitorFactory taskMoni
154
156
final Long annotationId = getLongParam (href , "annotationId" );
155
157
final Long streamId = getLongParam (href .toLowerCase (Locale .ROOT ), "streamId" .toLowerCase (Locale .ROOT ));
156
158
final Long eventId = getLongParam (href .toLowerCase (Locale .ROOT ), "eventId" .toLowerCase (Locale .ROOT ));
159
+ final String eventIdList = getParam (href , "eventIdList" );
157
160
final String title = getParam (href , "title" );
158
161
final String subject = getParam (href , "subject" );
159
162
final String status = getParam (href , "status" );
160
- // final String assignedTo = getParam(href, "assignedTo");
163
+ final String assignedTo = getParam (href , "assignedTo" );
161
164
final String comment = getParam (href , "comment" );
162
165
163
166
// assignedTo is a display name so have to convert it back to a unique username
@@ -166,14 +169,30 @@ private void openAnnotation(final String href, final TaskMonitorFactory taskMoni
166
169
annotation .setTitle (title );
167
170
annotation .setSubject (subject );
168
171
annotation .setStatus (status );
169
- // annotation.setAssignedTo(assignedTo);
172
+ if (assignedTo != null ) {
173
+ annotation .setAssignedTo (UserRef .builder ().uuid (assignedTo ).build ());
174
+ }
170
175
annotation .setComment (comment );
171
176
172
177
final List <EventId > linkedEvents = new ArrayList <>();
173
178
if (streamId != null && eventId != null ) {
174
179
linkedEvents .add (new EventId (streamId , eventId ));
175
180
}
176
181
182
+ if (eventIdList != null && !eventIdList .isBlank ()) {
183
+ final String [] eventIdStringArray = eventIdList .split ("," );
184
+ for (final String eventIdString : eventIdStringArray ) {
185
+ try {
186
+ final EventId eventId1 = EventId .parse (eventIdString );
187
+ if (eventId1 != null ) {
188
+ linkedEvents .add (eventId1 );
189
+ }
190
+ } catch (final RuntimeException e ) {
191
+ Console .log (e ::getMessage , e );
192
+ }
193
+ }
194
+ }
195
+
177
196
ShowAnnotationEvent .fire (this , annotation , linkedEvents );
178
197
}
179
198
0 commit comments