RTC: Read-Only Attributes For Condition not working in the Plan view
RTC 5.0.2.
A "Read-Only Attributes For Condition" precondition is working beautifully in the work item editor presentation, but it is not working in the Plan view. The attribute is editable there. It can be modified and saved.
I am wondering if this is a defect or it's the expected behaviour.
Other type of preconditions do work in the Plan view.
Is it possible that this one is not working because it relies on a javascript, which is only run in the editor presentation, but not in the plan view?
Thank you.
|
Accepted answer
One other answer
Hi Miguel,
I did a quick test using a sample script from this article and it worked fine for me on both work item view and plan view.
My environment has 5.0.2 with iFix006. Can you give it a try using this test script as well?
Comments Thanks a lot for your support, Alexandre.
You are right, the sample script from the article works fine in Plan view as well.
I've narrowed down the problem, and it seems to be in my script:
com.ibm.team.repository.web.client.session.Session seems to be somehow available in the Editor Presentation, but not in the Plan View.
dojo.provide("com.DO.IsLoggedIn");
(function() { dojo.declare("com.DO.IsLoggedIn", null, { matches: function(workItem, configuration) { dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes"); dojo.require("com.ibm.team.repository.web.client.session.Session"); var workItemAttributes = com.ibm.team.workitem.api.common.WorkItemAttributes; var getAuthenticatedContributor = com.ibm.team.repository.web.client.session.getAuthenticatedContributor; var loggedInUser = getAuthenticatedContributor().itemId; var owner = workItem.getValue("owner"); var result = (loggedInUser != owner); return result; } }); })(); |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.