Closed lremedi closed 10 years ago
When the popup is opened, the application checks if the story/defect owners belong to the logged in user (in the isMine() method). If not, it disables the popup item "-Signup".
public bool IsMine() {
var owners = (PropertyValues)GetProperty(OwnersProperty);
return owners.ContainsOid(DataLayer.MemberOid);
}
When tries to get the owners of the story/defect, it invokes this code:
public virtual object GetProperty(string propertyName) {
if (propertyName == EffortProperty) {
return EntityContainer.GetEffort(this);
}
var attribute = Asset.Attributes[TypePrefix + '.' + propertyName];
var allValues = GetPropertyValues(propertyName);
if (attribute.Definition.IsMultiValue) {
var currentValues = attribute.Values;
return allValues == null ? currentValues : allValues.Subset(attribute.Values);
}
var value = attribute.Value;
if (value is Oid) {
return allValues == null ? value : allValues.Find((Oid)value);
}
return value;
}
Because the owners of the story/defect (attribute) is not in the allValues list (all owners), an KeyNotFoundException is thrown.
The question is : why the owner is not present in allValues list? If is not present should we catch the exception, and return false in the isMine() method?
Under debug we determined so far:
@morrica01 says:
Question: Should user be able to edit an existing item and resave it when the owner is inactive?
Carlena Notes:
There seem to be multiple scenarios packed into all of this:
Given a Member named "Ian Inactivated",
And a Story named "Story with Inactivated Member" with "Ian Inactivated" as the Owner,
And "Ian Inactivated" has been Inactivated,
When I look at "Story with Inactivated Member"
Then ...
When I open the Owner drop-down for "Story with Inactivated Member"
Then ...
When I try to save a change to "Story with Inactivated Member"
Then ...
When I try to sign up for "Story with Inactivated Member"
Then ...
For release notes...
Fixed: Inactivated owner now shown with strike-through. Context menu now available for items with inactivated members.
Inactive user will be shown in the owners combo selector only when is already assigned to the asset. If not, no inactive users should be shown there.
notes:
We could show the inactive user in the node and, the active users in the combo. We could set as strikeout the inactive user in the node.
¿What happens if in the node we have one active and one inactive user? Now, it is setting both as strikeout:
Image as example:
Q: What happens when we have one active and one inactive Member? A: In the web application, only the inactivate Member has strike-through. The active user is shown normally.
One solution is to add "-" after and before the user name when is inactive: e.g.
Needs more amigos review :) Questions on user-value of the "-" approach. Explore more options.
Notes:
ianb and joe are inactive Members. josh is an active Member.
(Inactive: ianb), josh
(Inactive: ianb), josh, (Inactive: joe)
(Inactive: ianb) josh (Inactive: joe)
Test Steps:
Right click over some nodes of the tree, makes crash the plugin and VS. This issue was present before upgrading version of TreeViewNode.