Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes


Accepted answer

Permanent link
I forgot to update this question. Apologies for that.

This issue seems to be due to a wider limitation.
Plan views don't include all javascript libraries, as compared to Work Item Editor presentations.
According to a jazz developer:
"The 'Read Only Attributes For Condition' operation behavior is not considered by the current plan editor design."

More info here:
https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=373507

Ralph Schoon selected this answer as the correct answer

0 votes

Comments

Thanks Miguel. Please be aware that in the work item Web UI, there are a lot more JavaScript libraries available. But conditions are also supposed to run in the Eclipse client, where these are not available either. So the assumption to have all the JavaScript libraries available and actually also have valid values in objects is likely not true.

One prominent example is the loggedin user, which you can get in the Work Item Web UI, but you can't get if the script runs in the Eclipse UI.

1 vote


One other answer

Permanent link
 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?

0 votes

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

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,166

Question asked: Oct 08 '15, 12:32 p.m.

Question was seen: 5,091 times

Last updated: Apr 09 '16, 12:54 p.m.

Confirmation Cancel Confirm