-
Notifications
You must be signed in to change notification settings - Fork 0
AnA11S03ResourceBinding
TWiki> LibrePlan Web>AnA11S03ResourceBinding (10 May 2012, JavierMoran)EditAttach
Story summary | Resource Binding |
Iteration | AnA11UsersModule |
FEA | AnA11S03ResourceBinding |
Story Lead | |
Next Story | |
Passed acceptance test | No |
The idea to bind a resource to a user is to offer a way to interact with the application from the point of view of a resource. In this way a resource could have a user bound which allowed him to take part and see the planning from his role of resource.
The fact of being a resource has influence in several operations:
- A resource could track his time, and not the time devoted to other resources.
- A resource could track expenses belonging to him.
- A resource could view the status of the tasks that he has assigned.
In this point it is suggested how to do the link between a resource and a user. There are several ways to do this:
- From the user administration window.
- From the resource window
The second chosen is to to use the resource administration window as the entry point for this operation. The rationale behind this is that in the planning flow of operations the natural way to proceed is the next one:
- You create a resource in LibrePlan to be planned.
- At the moment of creating a resource the LibrePlan administrator could decide to create a user for that resource or to use one of the existing users.
It will be needed to create a relationship between the entities Worker
and User
according to the next diagram.
- A worker can be bound to 0..1 user
- A user can be bound to 0..1 user.
The one-to-one relationship can be travelled from both sides.
Only non limiting workers can be bound to users.
In the Personal data tab of the resource administration window there will a new area called Bound user. In this area the following fields will be rendered:
- 3 radio buttons with the next options: Not bound, Existing user and Create new user
- Depending on the option chosen the behavior will be different:
-
Not bound
- No more fields are needed
-
Existing user
- A bandbox search to look for the user to be bound. The format would be
login (first_name last_name)
or onlylogin
iffirst_name
andlast_name
are empty - A label to show the e-mail of the user
- A link to the user administration window (we should show a warning message about losing unsaved changes when clicking this link)
- A bandbox search to look for the user to be bound. The format would be
-
Create new user
- Several textfields to gather the minimum data to create a user. This minimum data will be: Username, Password, Password confirmation and E-mail.
-
Not bound
If the user press on the save button, depending on the option chosen different things will happen:
-
Not bound
- The resource will be not bound to any resource
-
Existing user
- The resource will be bound to the corresponding user
- The fields First name and Last name of the user will be updated with the worker info
-
Create new user
- The new user will be crated using the data from the text fields and also the First name and Last name from worker info
- After saving it'll be marked the option Existing user with the new user created as the one selected
If a worker is deleted and is possible to do this operation (the worker has not been assigned to any project yet), there could be 2 situations:
- The resource is bound to a basic user (without Administration role): Then a confirm dialog will be shown asking if do you want to delete the user too.
- The resource is bound to an administrator: Then the user will be unbound but not deleted.
NOTE: It is not suggested to delete these fields from the User because there will be users not bound to any resource and because we have these fields already in the database and maybe are being used in old LibrePlan deployments.
It will be created a new area called: Bound resource. It will have inside the following fields:
- Label: Has bound resource? Values: Yes | No
- A link to the resource administration window. This link will be rendered when the user has resource bound.
-
Unbound button. This button will remove the binding of the user with the resource after pressing the save button of the page. It will also delete the render of the link to the resource administration window.
- The unbound operation must not be cascaded to the
Worker
. This means that the worker will not be deleted in all the cases: When aUser
is deleted or when the unbound button is pressed in a user.
- The unbound operation must not be cascaded to the
It will be needed also to modify the following things:
- If a user is bound to the resource, the fields First name and Last name will be read-only in the user edition window.
- In the user list will be added a column with the title Bound resources. It will include the name (ID) if the user is bound to it.
If a user is deleted and it's bound to a worker:
- Then a warning dialog will be shown notifying that the user will be unbound
Tasks | Est | Spent | To do | Risk | Reviewer | Developer | Task Name | Start Date | Est End Date | End Date |
---|---|---|---|---|---|---|---|---|---|---|
Task | 3 | 5 | 0 | Low | JavierMoran | ManuelRego | Add relationship between and Worker and User | |||
Task | 21 | 10 | 0 | Low | JavierMoran | ManuelRego | Adapt resource administration window | |||
Task | 14 | 6.5 | 0 | Low | JavierMoran | ManuelRego | Adapt user administration window |
I | Attachment | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|
png | user_resource_binding_class_diagram.png | manage | 3.1 K | 02 May 2012 - 16:39 | JavierMoran |
Copyright (c) by the contributing authors. All material on this collaboration platform is the property of the contributing authors.