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

where xml file of project area is located in rational team concert.

Hi,
    I have just started to extend rational team concert.I am currently trying to develop plugin for follow up action for operation save work item, In that I want an XML structure containing all of the work item attribute values as they exist in the database after the save.

Any advice would be much appreciated, very stuck at this stage.

Thanks in advance.

0 votes


Accepted answer

Permanent link
could you explain a little more please..  not quite sure what you want.

the project XML does not have any VALUES of the attributes.
in the followup extension, you can get the CURRENT values (they were saved just before the extension was called). but you do not have an XML  structure, just the attributes, their values, and the attribute type (object). from that you could construct an xml document.

you can get the project XML from the project area
you can see code to get the xml structure here
https://jazz.net/forum/questions/159700/is-it-possible-to-migrate-an-rtc-project-area-to-a-different-process-parent-programmatically
in the accepted answer
                    // get the process data
                    @SuppressWarnings("unchecked")
                    Map<object, Object=""> pd = ip.getProcessData();

                    // get the content Manager
                    IContentManager icm = repo.contentManager();
                    // get the process config content object
                    IContent processSource = (IContent) pd.get(keyname);
                    if (processSource != null)
                    {
                        System.out.println("have xml source");
                        saveXMLSource(ip, processSource, icm, sPm);
                    }                   
Parveen Patel selected this answer as the correct answer

0 votes

Comments

Hi Sam,
           Thanks for your response,I want to retrieve work item attribute values during work item save operation and want to add that attribute values in xml format in  log file which i have created.
How I can achieve this.


you would have to loop thru all the attributes and build your xml doc..
the workitem is the NewState

the accepted answer here https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes has code that shows how to loop thru all the attributes of a workitem and get their types and values (most of them)

see
static void printAttributes(IWorkItem workItem, 

// loop thru all the workitem attributes in the project
            for (IAttribute ia : workItemCommon.findAttributes(projectArea,
                    monitor))
            {

                // if this workitem has this attribute and
                // its NOT an internal use attribute
                if (workItem.hasAttribute(ia) && !ia.isInternal())

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

Question asked: Jan 09 '15, 6:12 a.m.

Question was seen: 2,652 times

Last updated: Jan 09 '15, 7:05 a.m.

Confirmation Cancel Confirm