It's all about the answers!

Ask a question

How to save workitem through DOJO programming language?

Vikash Singh (422865) | asked Mar 18 '15, 5:53 a.m.

I have added one check box in Workitem and would like to save the workItem automaticaly without press the save button on the workItem UI.

Please guide me.

2 answers

permanent link
Jonas Studer (207917) | answered Mar 18 '15, 6:17 a.m.
You can do it through OSLC/REST

Vikash Singh commented Mar 18 '15, 6:24 a.m.

Can we do it into DOJO script inside calculate value (Attribute customization) ?

permanent link
Jonas Studer (207917) | answered Mar 18 '15, 6:44 a.m.

var newProxy = WorkItemProxyFactory.getWorkItemProxy({createIfNeeded: true});
newProxy.initialize({projectAreaItemId: "paID", type: "", newWorkItem: true, includeHistory: false});

//Set attributes
newProxy.object.attributes.summary.content = nSummary; = nCategory; = nTarget;

                       self: this,
                       operationMsg: "Saving",
                       applyDelta: true,
                       //instigator: this,
                       onSuccess: function(param) {
                           setTimeout(dojo.hitch(this, function() {
                               //Release cursor
                                         "cursor": "default",
                                        dojo.query("body")[0].style.cursor = "default";
                           }), 1000);

Maybe this will help you.
Read the article, and you'll get the Idea of the WIProxy

Your answer

Register or 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.