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

coditional script is working in V3 and same script is not working on RTC v4.

Hi Team

Finally, come to this stage and waiting for suggestion / help / information.
I have RTC v3, having script based condition is working and same script is not working  for same scenario. Based on enumeration value specific attribute is going to be mandatory.
Pls find the sample script
-----------------------------------------------------------------------
dojo.provide("org.example.workitems.providers.play");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
dojo.declare("org.example.workitems.providers.play", null, {
   matches: function(workItem, configuration) {
       var witype = workItem.getValue(WorkItemAttributes.TYPE);
      var wipriority= workItem.getValue(WorkItemAttributes.PRIORITY);
    if (witype === "com.ibm.workitem.workItemType.Task") {
  if (wipriority === "priority.literal.l4") {
     // Priority is High
            return true;
         } else {
            return false;
         }
      } else {
         return false;
      }
   }
});
})();
----------------------------------------------------------------
all neccessary steps has been followed and enable to run script on the v4 Server. Do i need to use specific syntax for v4 in .js file? Kindly lemme know , if you anybody come across this kind of behavior.

Many thanks
MRP

0 votes



One answer

Permanent link
 Hi MRP, can you be more specific on what is not working? Are there any hints in the logs? For mor information about logs and debugging please look into https://jazz.net/library/article/1093 lab 5 there are example scripts. 

0 votes

Comments

One thing that comes into mind is missing dependencies to the required attributes. 

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
× 12,023

Question asked: Feb 22 '13, 9:59 a.m.

Question was seen: 4,733 times

Last updated: Feb 22 '13, 10:58 a.m.

Confirmation Cancel Confirm