It's all about the answers!

Ask a question

For testing javascipt changes everytime I need to restart the jazz server. Is there any other way?


aastha khatri (22721) | asked Mar 17 '15, 3:10 a.m.
I was creating a custom widget. Everytime I modify the javascript file , to test it I need to restart the sever. Just installing the web bundle doesn't work. Is there any other shortcut as starting the server everytime takes a lot of time.

Thanks ,
Aastha

4 answers



permanent link
Jonas Studer (207917) | answered Mar 17 '15, 5:47 a.m.
Hy Aastha,

Yes there is a possibility. But you have to setup a specific eclipse area.
1: Article
https://jazz.net/library/article/1000

2: Document with the how to
https://jazz.net/library/content/articles/rtc/4.0/extensions-workshop/downloads/RTC4xExtPoT.pdf

With this setup (You might change some steps, because it's very old though)
you won't need to restart everytime you make some changes.
Only if you make some major changes like, changing the plugin.xml or assign new modules to the loader.

Wish you luck!

Comments
Jonas Studer commented Mar 17 '15, 5:49 a.m.

aastha khatri commented Mar 17 '15, 12:58 p.m. | edited Mar 31 '15, 11:52 a.m.

Hi jonas,

Thanks for providing your guidance. Actually I have set up a development environment as mentioned in the articles above. While extending server side functionality (like writing participant ,advisor and other java code) I just build that bundle and install it to the server using osgi commands where I don't have to restart the server. Just install the new jar does the work.
But currently I am working at the UI part where I have to create custom widgets . So whenever I modify the .js file I have to restart the server. I noticed that the js files are present in the cached bundle file at the  location
server/tomcat/work/Catalina/localhost/ccm/eclipse/configuration/org.eclipse.osgi/bundles/591/

This cache is updated only on server restart. I wanted to know whether I can do this without everytime restarting the server.

Thanks for your help!!
Aastha


Jonas Studer commented Mar 18 '15, 4:08 a.m.

Hy Aastha,

Hmmm, I'm not sure if understand the question right.
But as far as I know.
If you work with Bundles as mentioned above, then you will have to restart the server.
Also if you work with Widgets. Because, that has something to do with the Dojo-Loader which has to be configured at the startup. (You could change it on runtime, but I don't recommend that.)

But, as you say, you are working with custom Widgets.
This is something I do know a bit better (because I'm creatinga lot of custom Widgets)
If I do some changes on a .js File I never have to restart my Server!
Except I'm defining a new module or make changes in the plugin.xml
Also has to do with the loader.

The fist important thing to work that way, is to setup the Eclipse Environment (As Jetty Server).
To do so, the point 1.6 in this document "RTC4xExtPoT.pdf" is important!
There you gonna set up the 7443 environment (with "Create RTC Database")


Jonas Studer commented Mar 18 '15, 4:11 a.m.

After that, you could make your own running configuration based on the
"OSGI2 Launch --> Jetty RTC Server"
I simply duplicate it.
Then add a Bundle to it (which is your Widget).
Launch it trough "Run As", et voila, you can make changes, press F5 and you'll see the changes. Wish you luck!

If you can't bring it to work, I'll send you a manual for it. (If I'm allowed to)


aastha khatri commented Mar 19 '15, 2:02 p.m. | edited Mar 31 '15, 11:52 a.m.

Hi Jonas,
Thanks a lot!!  for your inputs. I will try to set up the environment and get back to you regarding the same if I have any queries.
Also could you please provide me some guidance on creating custom widgets. Currently I am trying to create a work item type "Bug" in project area "Project1" from a work item type"Story" in project area "Project2".
At Story I need to  provide a button below the "quick info" section .Once the user clicks on this button it should show a dialog , populating the mandatory fields of work item "Bug" which is in another project area .Also once the completion is successful I need to create a calm link type between the two work items.
Doubts:
1. Which RTC provided dialog can I extend?
2. While populating the values in the fields (of Bug work item type) through the rest service how can I send the project Area "Project1" from a project area "Project2" as this.workingCopy.getProjectAreaItemId() from Story returns me Project2 id.
3. What do we mean by calm link type? Do all the links come under this category? How can we create link between the work items of two different project Areas.

I hope i have not confused you with so many questions at once. Thanks for your much appreciated help!!

Thanks & Regards,
Aastha


Jonas Studer commented Mar 23 '15, 6:54 a.m.

Hy Aastha,

Fist I have to tell you, this will be a lot of work for you!
Those goals are not easy to reach, because you can't achieve your requirements only with a Widgets (Despite you'll create a BIG one)

Also your "custom Widget" sounds more like "custom Workitem" or "extended WebUI Dashboards". (Because I can't see/understand how your workflow will work in a Widget.)
If it is your first Widget I would suggest you'll start with a "display only" Widget.
This means you only display data, instead of manipulating them.
This will help you a lot more to understand how those Widgets work!
Because data-manipulating is a hard part there to start with!


Jonas Studer commented Mar 23 '15, 7:05 a.m.

1: Where should this button be?

2: Mixing ProjectAreas are a bit harder, because the ideology IBM created in RTC is a Tree Logic, which root is the PA! But it's not unachievable (I have to do this a lot too)

3: Links in WI are pain in the ***! I've already opened a question there, which I answered myself...

4: Do you work with the AMD-Notation?
I could show you some Plain-Classes for Widgets.

5: Dialog:
Official RTC Dialog is this "jazz.ui.Dialog"
But I'm getting rid of IBM-Native Classes, because I don't like IBM anymore!
Better use "dijit/Dialog", this is Dojo native.

6: Project Area:
I don't get the Question...
Do you want the "Project2"-UUID?

7: Calm Links:
As mentioned in point 3, Links and WI are hard to understand.
Despite IBM, sais this don't work, I've got a solution to add Links (OSLC/Outside-Links/ WI-Links, etc) to a WI.
(There is also a question about it)


aastha khatri commented Mar 25 '15, 6:08 a.m. | edited Mar 31 '15, 11:52 a.m.

Hi Jonas,

First of all thanks for spending so much time in going through my question and replying.
1.As of now I have created a simple widget which just has a button called "Create Defect" in a section called "Defect Creation" which is displayed just below the quick information section (RTC provided for displaying links) in story workitem editor of PRoject Area1.
Once I click this button I am invoking a service through ajax call which will create a defect work item (with some default values hardcoded at service) in project Area 2  and on successful creation it will show a popup displaying the link to this defect. Alongwith this a link to this defect will be created in story work item and shown in the quick information section.
(Currently I have written the code and testing it. Hopefully the interlinking between two PAs work.)

In Future I might have to implement a User interaction approach to above case. That will be once a user clicks on "Create Defect " I should dynamically  create a dialog where I can show mandatory attributes like "Project Area" , Filed Against,some custom  attributes. For this I was planning to use the RTC provided "select work item dialog " as it has project area drop down (creating it manually will be difficult) and scrapping the fields not required and adding my fields to the dialog .

2. Regarding the Project Area mixing can you share some points how you achieve.
3. ok
4. No I am not using the AMD notation , I am working with older version of dojo.
5.The issue with using dojo /Dialog is I might have to create fields like Project Area which looks tricky but in RTC provided dialog (com.ibm.team.workitem.web.ui.internal.view.editor.SelectWorkItemDialog) alreay has it.
6. Actually for creating a Defect work item in PA2 from PA1 I don't know which approach I should follow among the following two:
  1. Should I hard code the PA2 UUID in code.
  2. Should I get all the project areas from processitem and pick the one with name projectArea2
7.Can you share the article regarding CALM links.

Apart from this I have one question have you ever worked in customizing the actions column in planeditems page in planUI editor? 


Thanks & Regards,
Aastha

This seems to be a bit tricky .


Jonas Studer commented Apr 01 '15, 6:38 a.m.

Hy aastha,

Sory for waiting so long, I had no time.

Hmm... I still don't get why you call these things "Widgets".
In my understanding "Widgets" are only placed in the Dashboard.
Otherwise it would be a module in my opinion...
Or does I mix Viewlet with Widget?

So, you're changing the webUI of RTC, which means you customize it.
So far my understanding :D

5: First, I would do it this way. But also be sure, for IBM it's a "tempoary" class which always could change without noticing you! That's the only point.
But if you dug deeper into RTC, you'll see it makes sense to create something like an Interface. For me, I create classes, where I put all the IBM Stuff in it, so I have an abstraction Level towards IBM. If they change, I have to change only a few things in those classes.

6: You should clearly take the second approach!
Never work with fix coded UUID's! You'll gonna have a bad time otherwise ;)
(I'lll show you how)

7: Here it is.
https://jazz.net/forum/questions/166636/how-to-add-links-to-a-workitem-in-rtc-5x-jsdojo

showing 5 of 9 show 4 more comments

permanent link
Jonas Studer (207917) | answered Apr 01 '15, 6:58 a.m.
***** How to get PA's (with Deffered wrapped around it)*****
//Change serviceResponseHandler //This here is based in AMD
//Require //com.ibm.team.repository.web.transport.ServiceResponseHandler
//Require //com.ibm.team.process.web.client.internal.ProcessClient

        getProjectDevelopmentLinesByUUID: function(uuid){
            var deferred = new Deferred();
            var deferredResponseObject = {
                    self: this,
                    success: function(response) {
                        deferred.resolve(response);
                    },
                    failure: function (error) {
                        deferred.reject(error);
                    }
            };
            //Change in non AMD
            var srh = new this.ServiceResponseHandler(deferredResponseObject, "success", "failure");
            var args = {
                    includeArchived: false,
                    processAreaContext:    1,
                    uuid: uuid
            };
            //Change in non AMD
            this.ProcessClient.getProjectDevelopmentLines(args, srh);
            return deferred;
        },


//Call the function
this.class.getProcessAreaHierarchies().then(function(result){
                //Do something with the result
});

permanent link
aastha khatri (22721) | answered Apr 06 '15, 3:58 a.m.
Hi Jonas,

Thanks for your help!! very much appreciated.
I have a query regarding the jetty server set up. I don't see the "OSGI2 Launch" or Junit2 launch configuration in my Eclipse Run configurations window.
How should I proceed ?

Thanks & Regards,
Aastha


Comments
Jonas Studer commented Apr 08 '15, 4:10 a.m.

Hy Aastha,

You'll get this thing on Page 7, (1.e)
Or downlad it here
https://jazz.net/wiki/pub/Main/FeatureBasedLaunches/com.ibm.team.dev.launch_0.3.3.201004231417.jar

I told you, you should read carefully ;)


permanent link
aastha khatri (22721) | answered Apr 13 '15, 1:34 a.m.
Thanks Jonas!! My mistake :)

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.