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

calculateCategoryAsString

 I have installed the command line of the work items, and the following code gives me an error in the methods "getWorkItemCommon" and "getMonitor".


private String calculateCategoryAsString(Object value)
            throws TeamRepositoryException {
        if (value != null) {
            if (value instanceof ICategoryHandle) {
                return getWorkItemCommon().resolveHierarchicalName(
                    (ICategoryHandle) value, getMonitor());
            }
            throw new WorkItemCommandLineException(
                    "Convert Category - Incompatible Type Exception: "
                            + value.toString());
        }
        return CONSTANT_NO_VALUE;
    }

0 votes



One answer

Permanent link

getWorkItemCommon() is implemented in an  abstract class and returns the client library IWorkItemCommon usign getClientLibrary(). getMonitor() is implemented similar and returns an IProgressMonitor. For a monitor you can pass null as well. The link I provided has several other links talking about the basics of the plain java clienent libraries/rtc java API, especially in the section about getting started. You want to read those as well.

 IWorkItemCommon.resolveHierarchicalName(
                    (ICategoryHandle) value, null);
    





    


0 votes

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

Question asked: Jan 03 '19, 8:28 a.m.

Question was seen: 1,777 times

Last updated: Jan 03 '19, 10:30 a.m.

Confirmation Cancel Confirm