how to create a Button in a workitem using server side java API ?
Accepted answer
Comments
Hello Ralph
Thank you so much for the info :)
Can i know how i can deploy this button feature in the server .
Because when i add this code and run the server i am not able to get this feature .
I deployed using updatesite .
Read https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ follow the links and do the extension workshop.
Enable yourself in debugging server extensions, because otherwise you just waste a lot of time.
The blog has other examples and the most recent server extensions also show how to create an environment that allows deploying more easily compared to the manual process shown in the Extensions Workshop.
Hello Ralph
I could Deploy the Toolbar action code using update site ..And its succssfull.
I could see the Image ( Add related defect ) in the UI in story workitem.
But when i click on that ,The action is missing.
I imported the code from
https://jazz.net/library/content/articles/rtc/3.0.1/linked-defect-toolbar-action/snippets
/net.jazz.example.workitem.web.zip.
Please let me know where i m going wrong .???
How should I know? I created an example based on this and it works for me. I don't know if I had to change anything. The action to be performed is in the LinkedDefectEditorToolbarAction.js file.
Debug it on Jetty.
Hi
Thanks ..It worked for me ...'
I have one more concern ..
How can I copy attributes ( Eg: Summery,Filed against ...) from story workitem to Defect workitem In the Above javascript ?
Can we Automatically Save the created Workitem (here it is Defect) using above javascript ?
Thank you in advance ...
I believe from https://jazz.net/library/article/782/ you would use the code below to get at the attributes you want. I don't have more to contribute, as I have not done this myself.
// Calculate current Project Area and Work Item Type this._currentWIType = new String(this.workingCopy.getValue({ path: "attributes.workItemType.id"})); this._currentPArea = new String(this.workingCopy.getValue({ path: "attributes.projectArea.id"}));
Hi
Yes above code i have already used to get the value ..
But my concern is how can we set the value to the new workitem created using above script?