Problem with Wokflow graph in RTC
Hello team
I am using a Script based value set called " WorkflowGraph" , The link of the workflow script is not appearing in the Defect WI. But if i change the Process sharing into another template and then switch back again to the current template then its appearing again ...Could you please Let me know what is going wrong
Many thanks in advance :)
getValue: function(attribute, workItem, configuration) {
debug("Start");
var workflowType = workItem.getValue(WorkItemAttributes.TYPE);
var workflowState = workItem.getValue(WorkItemAttributes.STATE);
if(workflowType == "defect") {
return "https://inside-docupedia.bosch.com/confluence/download/attachments/359083805/Defect_0.2.jpg";
}
I am using a Script based value set called " WorkflowGraph" , The link of the workflow script is not appearing in the Defect WI. But if i change the Process sharing into another template and then switch back again to the current template then its appearing again ...Could you please Let me know what is going wrong
Many thanks in advance :)
getValue: function(attribute, workItem, configuration) {
debug("Start");
var workflowType = workItem.getValue(WorkItemAttributes.TYPE);
var workflowState = workItem.getValue(WorkItemAttributes.STATE);
if(workflowType == "defect") {
return "https://inside-docupedia.bosch.com/confluence/download/attachments/359083805/Defect_0.2.jpg";
}
3 answers
Hello Ralph @Ralph Schoon
You can refer the whole below script which i am using .. It was working fine before....But sometime back i found that there was no workflowgraph loaded in Defect WI .Then i switched back to the old process provider then again to the current
Process provider ,Then it started working
But i am unable to find the root cause
dojo.provide("com.example.rtc.js.client.workflow.formal");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var doDebug = true;
var scriptname = "WorkflowGraph";
var WorkItemAttributes = com.ibm.team.workitem.api.common.WorkItemAttributes;
dojo.declare("com.example.rtc.js.client.workflow.formal", null, {
getValue: function(attribute, workItem, configuration) {
debug("Start");
var workflowType = workItem.getValue(WorkItemAttributes.TYPE);
debug("workflowType: " + workflowType);
var workflowState = workItem.getValue(WorkItemAttributes.STATE);
debug("workflowState: " + workflowState);
//return workflowType + " " + workflowState;
if(workflowType == "defect") {
return "https://inside-docupedia.bosch.com/confluence/download/attachments/359083805/Defect_0.2.jpg";
}
else if(workflowType == "com.ibm.team.apt.workItemType.story") {
return "https://inside-docupedia.bosch.com/confluence/download/attachments/359083805/Story_0.2.jpg";
}
return "Workflow type '" + workflowType + "' unknown.";
function debug(display){
if(doDebug){
console.log(scriptname + " " + display);
}
}
}
});
})();
You can refer the whole below script which i am using .. It was working fine before....But sometime back i found that there was no workflowgraph loaded in Defect WI .Then i switched back to the old process provider then again to the current
Process provider ,Then it started working
But i am unable to find the root cause
dojo.provide("com.example.rtc.js.client.workflow.formal");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var doDebug = true;
var scriptname = "WorkflowGraph";
var WorkItemAttributes = com.ibm.team.workitem.api.common.WorkItemAttributes;
dojo.declare("com.example.rtc.js.client.workflow.formal", null, {
getValue: function(attribute, workItem, configuration) {
debug("Start");
var workflowType = workItem.getValue(WorkItemAttributes.TYPE);
debug("workflowType: " + workflowType);
var workflowState = workItem.getValue(WorkItemAttributes.STATE);
debug("workflowState: " + workflowState);
//return workflowType + " " + workflowState;
if(workflowType == "defect") {
return "https://inside-docupedia.bosch.com/confluence/download/attachments/359083805/Defect_0.2.jpg";
}
else if(workflowType == "com.ibm.team.apt.workItemType.story") {
return "https://inside-docupedia.bosch.com/confluence/download/attachments/359083805/Story_0.2.jpg";
}
return "Workflow type '" + workflowType + "' unknown.";
function debug(display){
if(doDebug){
console.log(scriptname + " " + display);
}
}
}
});
})();
It is impossible, from the script and the description you provide, to answer your question. You may want to contact support. Support can ask for log files etc.
PS: if you return the calculated value into a string or HTML attribute, then I would not expect the link to work or automatically display an image. Automatically displaying an image as explained in https://jazz.net/library/article/1093 at the end of lab 5 only works with attributes of type wiki and the image is attached to a work item as described in said lab, as far as I know.
PS: if you return the calculated value into a string or HTML attribute, then I would not expect the link to work or automatically display an image. Automatically displaying an image as explained in https://jazz.net/library/article/1093 at the end of lab 5 only works with attributes of type wiki and the image is attached to a work item as described in said lab, as far as I know.