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

how to create a Button in a workitem using server side java API ?

Hello Team

I want to know How can we create a button in a workitem using server side API ?

Also how can we give actions to the button ?

Please let me know how can we do this using server side API .


0 votes


Accepted answer

Permanent link
See https://jazz.net/library/article/782/ . Please note, I haven't found how to do that in the Eclipse client.
vinitha dsouza selected this answer as the correct answer

0 votes

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?

showing 5 of 7 show 2 more comments

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,952

Question asked: Jan 21 '16, 6:52 a.m.

Question was seen: 2,074 times

Last updated: Jan 27 '16, 4:21 a.m.

Confirmation Cancel Confirm