Defect #3057
closedReplace or remove contract guarantee in bulk when selecting all records (multiple issues)
100%
Description
Tested on 12.1.0. It worked well on 11.2.1.
Several problems with the new feature of selecting original guarantee for bulk actions Replace or Remove contract guarantee:
A) Go to the detail of some manager and to the tab Subordinates . Select all records and choose the bulk action Replace contract guarantee. Nothing happens.
B) Use the field " Own group search by usernames, ..." - put some logins there, select all records and choose the bulk action Replace contract guarantee. Nothing happens.
C) Too many options in the select box: if you select only some records, it displays correct original guarantee (1 in our case).
But if you select the same users by selecting all records filtered to some filter (user type), wrong guarantees are displayed (4 in our case - the correct one and 3 more, who don't have any guarantee. The logged user has read and autocomplete for these 3.)
Error in catalina log: (A)
2022-02-14 17:17:39.685 WARN 2593042 --- [ajp-nio-127.0.0.1-8009-exec-3] eu.bcvsolutions.idm.core.exception.ExceptionControllerAdvice.log : [core:BAD_FILTER:3dd61213-c132-4a4c-a86b-6d187a9d251e] The filter is wrong! ({}) eu.bcvsolutions.idm.core.api.exception.ResultCodeException: The filter is wrong! at eu.bcvsolutions.idm.core.api.utils.FilterConverter.toFilter(FilterConverter.java:56) ... Caused by: java.lang.IllegalArgumentException: Cannot deserialize value of type `java.util.UUID` from String "x0551799": UUID has to be represented by standard 36-char representation at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityFilter["subordinatesFor"]) at com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:4314) at com.fasterxml.jackson.databind.ObjectMapper.convertValue(ObjectMapper.java:4245) at eu.bcvsolutions.idm.core.api.utils.FilterConverter.toFilter(FilterConverter.java:54) ... 145 common frames omitted Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.UUID` from String "x0551799": UUID has to be represented by standard 36-char representation at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityFilter["subordinatesFor"]) at com.fasterxml.jackson.databind.exc.InvalidFormatException.from(InvalidFormatException.java:67)
Error in catalina log: (B)
Caused by: java.lang.IllegalArgumentException: Cannot construct instance of `java.util.ArrayList` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('t107342345') at [Source: U at com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:4314) at com.fasterxml.jackson.databind.ObjectMapper.convertValue(ObjectMapper.java:4245) at eu.bcvsolutions.idm.core.api.utils.FilterConverter.toFilter(FilterConverter.java:54) ... 145 common frames omitted Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `java.util.ArrayList` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('t107342345') at [Source: U at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63) at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1588) at com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1213) at com.fasterxml.jackson.databind.deser.std.StdDeserializer._deserializeFromString(StdDeserializer.java:311) at com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.handleNonArray(StringCollectionDeserializer.java:284) at com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:192) at com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:182) at com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:25) at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129) at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:324) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:187) at com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:4309) ... 147 common frames omitted 2022-02-14 18:20:15.366 WARN 6348723 --- [AsyncAppender-Worker-DB_ASYNC] org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions : SQL Error: 0, SQLState: 22001 2022-02-14 18:20:15.366 ERROR 6348723 --- [AsyncAppender-Worker-DB_ASYNC] org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions : ERROR: value too long for type character varying(254)
Files
Updated by Alena Peterová almost 3 years ago
- File bulk_change_identifiers.png bulk_change_identifiers.png added
- File bulk_change_all_users.png bulk_change_all_users.png added
- File bulk_change_selected_users.png bulk_change_selected_users.png added
- Subject changed from Cannot replace or remove contract guarantee in bulk when selecting all records from the Subordinates tab to Replace or remove contract guarantee in bulk when selecting all records (multiple issues)
- Description updated (diff)
- Priority changed from Normal to Urgent
Updated by Tomáš Doischer almost 3 years ago
- Status changed from New to In Progress
- Target version set to 12.1.1
- % Done changed from 0 to 60
Cases A and B are caused by a different use of filters in these cases, this turned out to be a simple fix. In case C, I am not completely sure what the issue is. There is a problem with permissions but I'm not sure it is causing this and that the fix will help this. I wasn't able to replicate a case where someone who is not a contract guarantee would show here.
While looking at this, I added error handling for too many selected users.
Updated by Tomáš Doischer almost 3 years ago
- Status changed from In Progress to Needs feedback
- % Done changed from 60 to 90
After consultation with Alena, I think these fixes should be sufficient.
Updated by Tomáš Doischer almost 3 years ago
- Assignee changed from Tomáš Doischer to Roman Kučera
@kucerar, can you please give me feedback?
Updated by Roman Kučera almost 3 years ago
- Status changed from Needs feedback to Resolved
- Assignee changed from Roman Kučera to Tomáš Doischer
Code LGTM.
I tested use-cases from description and everything looks good. thx for fix
Updated by Tomáš Doischer almost 3 years ago
- Status changed from Resolved to Closed
- % Done changed from 90 to 100