Project

General

Profile

Actions

Task #2967

closed

identity-role-complex-report - add columns, sort, one line per user

Added by Alena Peterová about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Tomáš Doischer
Target version:
Start date:
10/01/2021
Due date:
% Done:

100%

Estimated time:
Owner:

Description

We would like to add new features in the report "Identities and their role with complex combination with contracts attributes" (identity-role-complex-report):
  • add phone and email of identities
  • add user type of identities
  • add selected EAV attributes of identities (in our case, we could display all EAVs, but it may not be desired in all projects)
  • display one line per user - or add a parameter to hide assigned roles completely from the report (we don't need them in our project)
  • sort the resulting report by username (not required, but it would look better, especially when there are multiple lines per user)
Actions #1

Updated by Tomáš Doischer about 3 years ago

To me, this sounds more like a new identity report which I would be happy to create. (There is none as of yet.) The reason there are multiple lines for one user is because this really is a report of identity roles. It seems confusing to have an option to hide roles from it and adding all roles to one line is problematic in terms of formatting. Also, sorting by username is going to be difficult and I suspect I would need to keep a lot of data in memory to do that.

So rather than that, I would create a new report which would contain the same data as the identity-role-complex-report and some extra:

  • Username
  • ExternalCode
  • FirstName
  • LastName
  • Titles
  • Disabled
  • State
  • WorkPosition
  • Guarantees
  • Position
  • WorkPosition
  • State
  • ValidFrom
  • ValidTill

(These are all from identity-role-complex-report. One difference I would make is in getting the contract data - right now, the contract is taken from the identity role. I would instead use prime contract.)
I would add:

  • Phone
  • Email
  • Projection
  • Identity EAV attributes (With the possibility to specify their code in configuration and a checkbox which would show all attributes. I would prefer to only show SHORTTEXT attributes but I suppose I could show all attributes.)

Sorting by username is then easy since I actually can sort data in the find method.

Much of the code from identity-role-complex-report can be moved to an abstract class (or maybe a manager/utils class of sorts, inheritance seems a bit wonky here).

A careful prediction: 2 MDs

Actions #2

Updated by Tomáš Doischer about 3 years ago

  • Status changed from New to In Progress
  • Assignee set to Tomáš Doischer
  • % Done changed from 0 to 20
Actions #3

Updated by Tomáš Doischer about 3 years ago

  • % Done changed from 20 to 70

I implemented the new identity complex report. The identity form values are shown and are dynamic, each has its own column. When creating the report, you can either specify the attributes you want to see (by code!), or you can select to show all identity EAVs. You can also now filter users by user type.

A few notes:

  • the report shows user type but only the code of the projection - the name is a frontend property
  • the EAVs are shown towards the end of the report - this may look strange since it follows contract attributes but because the columns are generated dynamically, it would be a bit difficult to do otherwise. I also assume that contract information is more important than EAV values
  • the columns for EAV values can be empty - if no user has the value but the report was configured to show it, it will be empty

Commit: https://git.bcvsolutions.eu/modules/reports/-/commit/d0f2eee0ce84291ab69ed01ebffec58241ce0286

Now I need to create documentation.

Actions #4

Updated by Tomáš Doischer about 3 years ago

  • Status changed from In Progress to Needs feedback
  • % Done changed from 70 to 80
Actions #5

Updated by Roman Kučera about 3 years ago

I did review, LGTM.

Actions #6

Updated by Tomáš Doischer about 3 years ago

  • Status changed from Needs feedback to Resolved
  • % Done changed from 80 to 100

Released.

Actions #7

Updated by Tomáš Doischer about 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF