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

Problem using configuration.getWorkflowAction for attribute customization

Hi,

I have created new custom timestamp attribute named "Reopened Date" and I want to use it like "Resoled date".
I have succeded to use a script based calculated value for state=reopened, but this is not accurate, I would like to catch the workflow action of reopen. but it is not working.
Here is my script:
dojo.provide("com.example.ValueProvider");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
    
dojo.declare("com.example.ValueProvider", null, {
        getValue: function(attribute, workItem, configuration) {
var currentDate= new Date();  
//if (configuration.getWorkflowAction()=="bugzillaWorkflow.action.reopen") NOT WORKING...
if (workItem.getValue(WorkItemAttributes.STATE)=="6") {
return currentDate.getTime().toString();
}
return 0;
        }
    });
})();

0 votes


Accepted answer

Permanent link
 This has been discussed in the forum many times. Please search for answers in the last two days for more details. All you can do in a script is trigger on the value of the state. You can't see the previous value. Scripting is not a good approach for what you are trying. Try this approach http://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ .
Moti Wertheimer selected this answer as the correct answer

0 votes

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
× 10,934
× 233
× 152
× 34

Question asked: Dec 27 '12, 4:32 a.m.

Question was seen: 6,500 times

Last updated: Apr 02 '13, 4:44 a.m.

Confirmation Cancel Confirm