Why are conditions for Required Attributes run even when I open a work item that does not contain the given attribute?
RTC 4.0.0.1
I created three Conditions that are Script-based conditions.
Then in Operational Behaviors, I have the Precondition "Required Attributes For Condition" for Save Work Item and have each of those 3 conditions specified for each of 3 Custom Attributes. These custom attributes ONLY exist within a new work item type called "Dependency". Each of these java script files does a console.log() message for debugging.
I have everything saved.
Then I open a TASK work item type. Note that NONE of these 3 custom attributes for the conditions exist in this work item type.
However, in my console log, I get these console.log messages (and I get 3 of them for each javascript file.
I realize that this doesn't "hurt" anything, but I can see this causing some amount of performance overhead if these 3 javascript files is run for EVERY work item that gets opened.
I think this is a bug .. that RTC should know that the custom attribute defined for the condition does NOT exist in the work item and therefore, NOT invoke the javascript condition. Is this correct? If not, can someone explain to me WHY RTC seems to need to run a condition for an attribute that doesn't exist in that work item type??
Susan
I created three Conditions that are Script-based conditions.
Then in Operational Behaviors, I have the Precondition "Required Attributes For Condition" for Save Work Item and have each of those 3 conditions specified for each of 3 Custom Attributes. These custom attributes ONLY exist within a new work item type called "Dependency". Each of these java script files does a console.log() message for debugging.
I have everything saved.
Then I open a TASK work item type. Note that NONE of these 3 custom attributes for the conditions exist in this work item type.
However, in my console log, I get these console.log messages (and I get 3 of them for each javascript file.
I realize that this doesn't "hurt" anything, but I can see this causing some amount of performance overhead if these 3 javascript files is run for EVERY work item that gets opened.
I think this is a bug .. that RTC should know that the custom attribute defined for the condition does NOT exist in the work item and therefore, NOT invoke the javascript condition. Is this correct? If not, can someone explain to me WHY RTC seems to need to run a condition for an attribute that doesn't exist in that work item type??
Susan
2 answers
Do you get an error in the UI when you open the Task work item?
If not, it does sound like a defect. I would recommend opening a defect work item on jazz.net specifying this information. We don't typically support customizations such as this through the PMR process, so I believe a work item is the best way to go.
If not, it does sound like a defect. I would recommend opening a defect work item on jazz.net specifying this information. We don't typically support customizations such as this through the PMR process, so I believe a work item is the best way to go.