The Work Item Command Line is now Open Source


To allow customers to use and share the WorkItem Command Line freely, it has now been released under the MIT License.

Access the Source Code

The code is available in the Jazz Community.

OpenSourceGitHub

License

Released under the MIT License. See the License.txt and the license headers in the individual files.

Changes

The current version uploaded there contains the capabilities described in The RTC Work Item Command Line on Bluemix.

Additional Download

You can also download the latest version 4.0 here:

Please note, there might be restrictions to access Dropbox and therefore the code in your company or download location.

Usage and install

Please see the posts A RTC WorkItem Command Line Version 3.0.

For the general setup follow the description in A RTC WorkItem Command Line Version 2.

For usage follow the description in A RTC WorkItem Command Line Version 2 and in A RTC WorkItem Command Line Version 2.1. Check the README.txt which is included in the downloads.

Summary

The work item command line is now available on IBM Bluemix Dev Ops Services and can be accessed and worked on there.

26 thoughts on “The Work Item Command Line is now Open Source

  1. Thank you, Ralph! Your code and articles are so valuable for learning and working with the RTC API. I wanted to sign up and see if there was anyway I could help and by doing so learn more about the API but from what I can tell, DevOps BlueMix is a paid service. Am I missing the secret decoder ring or would I need to buy BlueMix before being able to interact properly with DevOps BlueMix?

    • Andy, the code is – currently – in an RTC SCM repository (version 5.0.2) on Bluemix Dev Ops Services. To access the code open the project and request access – I will grant it. The code is also attached here. The access to the data/repository is free.

      I have talked to other companies that heavily use my code and maybe they will bring it over to some other repository. I could not give in and put it in some GIT repo – sorry, I am an RTC Guy 8)

      I simply don’t have the bandwidth to maintain and test all this. I will try to integrate some changes from other colleagues if I can and then I hope others take over and create a community around it.

      PS: as a benefit, a lot more example code is in several components in that repository.

    • The file is part of the RTC Eclipse Client (rich client platform). Install the RTC Eclipse client using a plain zip or the P2 install and search the install folder hierarchy for com.ibm.team.workitem.rcp.core*. You will find such a file in the plugins folder.

      • Hello Raph again,
        Thank you for your replay, I have another question:
        I create my main class in java and I would like to update the Workitem using WCL here is my code :

        public class Main {

        public static void main(String[] args) {
        // TODO Auto-generated method stub
        ParameterList pl = new ParameterList();
        pl.addParameterValue(“repository”, “https://xxx.ttt.cccc.vvv/xx”);
        pl.addParameterValue(“user”, “ADjk”);
        pl.addParameterValue(“password”, “pass@rd”);
        pl.addParameterValue(“id”, “713576”);
        pl.addParameterValue(“internalState”, “On Hold”);
        pl.addCommand(“update”);
        ParameterManager pM = new ParameterManager(pl);

        UpdateWorkItemCommand upWorkItem = new UpdateWorkItemCommand(pM);
        try {
        upWorkItem.process();
        } catch (TeamRepositoryException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        }

        }

        }
        I have this probleme :

        Exception in thread “main” java.lang.NullPointerException
        at com.ibm.js.team.workitem.commandline.framework.AbstractTeamRepositoryCommand.getWorkItemCommon(AbstractTeamRepositoryCommand.java:118)
        at com.ibm.js.team.workitem.commandline.commands.UpdateWorkItemCommand.process(UpdateWorkItemCommand.java:81)
        at cmd.Main.main(Main.java:23)

        I wonder if I forgot a mandatory parameter,but from cmd it’s working well here is my command :
        wcl -update /ignoreErrors repository=”https://xxx.ttt.cccc.vvv/xx” user=ADjk password=pass@rd id=713576 internalState=” On Hold”

        I am waiting forward for your answer.
        thank you in advance

      • Sorry, but there you are on your own. It should be easy enough to find out where the nullpointer happens and why.

        I have also described how to extend the WCL, instead of calling it.

  2. Hi,

    I have a custom attribute of type “Iteration” which I want to bulk-update based upon a query.

    The query for each Project Area is named the same as “Current Iteration”. I want to copy the value of “planned for” to this new custom attribute (which has the same type). I could do with some help building the WICL command due to the multiple PAs and formatting of the “Iteration” type. Also, ideally, would be nice to use the “planned for” attribute to set the “custom attribute” value directly.

    -bulkupdate
    repository=”[my repo]”
    user=”[my user]”
    password=”[my password]”
    query=”Current Iteration”
    querysource=”value” (how to list multiple project areas?)
    /skipEmailNotification
    {parameter[:mode]=value} > {custom_attribute_ID[:set]=???Planned For Iteration???}

    The purpose is so that we can capture which sprint the work item was originally planned for at the time the iteration became “current” and see where work items are becomming deferred across multiple projects, we need more info than the default BIRT reports provide on a per-project basis.

    • Hi Glyn,

      the documentation is here: https://github.com/jazz-community/work-item-command-line

      I have spent a lot of time in creating it. It explains how to set attributes of special types such as iterations. Please read it. I have also made the observation that reading data is often useful to understand how the data would look like to write the data. So you could get a query result or print a work item to see how that looks like, especially the iteration attribute.

      Only one project area is supported by one call, you have to run seperate calls for each project area.

      If you have more specific questions, plase get back to me ideally on an issue in the project.

    • I have to correct myself somewhat, the bulk update works on a query. The query can either be a personal query or a shared query in the latter case you can provide a query source, project and team areas. The documentation inclues an example.

      But queries live in project areas and can only query within project areas. There fore my first answer is pretty much correct as well.

  3. Hi Ralph,
    Thank you for building and developing this utility. I am in need of a way to export all the attachments in a given project area to the filesystem. It’s not important that the association to the original workitem is retained although it would be nice if it was. Where can I find the latest version of the WCL, is that the one in BlueMix? Some of the versions appear to offer a “packaged, executable application”. Does that mean it is one that can be installed on a workstation or does it have to be imported into an eclipse workspace and built there? I have done the latter with the “WorkItemCommandLine_Project-V3.2 -20151120” which I realize is old code and I find that it can’t find “com.ibm.team.workitem.rcp.core_3.1.800.v20140706_1427.jar”. I have looked for that jar file in the p2 repos for each version between 3.0.1.6 and 5.02 and I can’t seem to find it. What, in your opinion, would be the best way to do a bulk download of all attachments in a project area, if that can be done?
    Thank you

    • The WCL can be found following the link in the second sentence of the post: “The code is available in the Jazz Community.” The link is: https://github.com/jazz-community/work-item-command-line

      The current version is 5.3.1.

      There is a readme that is not perfect, but tries to explain what WCL can do.

      There are releases. Sometimes, I attach a release that works, if one supplements the Plain Java Client libraries. I attached one to the latest release just now. That was built with 6.0.6.1.

      Usually you are supposed to build on your own. How to is explained in a document called build-readme.md.

      Download or clone the source code and import it into an Eclipse workspace.

      WCL only requires the Plain Java Client Libraries as a user library. You can use a client or server workspace for the Extensions Workspace and the Plain Java Client Libraries on top which is the best for debugging.

      As I am unable to build for all EWM releases, it would be best you build your own WCL.

      To get all attachments for all work items in a project area you can use -exportworkitems for a query that selects all work items of a project area. Export the attributes you like. Attachments are stored in a folder structure alongside the export csv.

  4. WCL can be deployed on any workstation – provide the plain java client libraries alongside it when building, or provide them using the path setting in the WCL shell scripts.

    • Are you referring to the opencsv-4.3.2.jar & commons-lang3-3.3.1.jar? I have the Extensions Workshop for version 6.0.6.1 completely installed with the same version Plain Java Client Libraries and have created a new workspace and imported the com.ibm.js.team.workitem.commandline project. I have copied them into the lib folder underneath the com.ibm.js.team.workitem.commandline project in Eclipse. I am getting a “CSVWriter cannot be resolved to a type” error in ExportCommand.java and the same error is being reported in ValidateOSLCLinksCommand.java for “Httpheaders”. Would 4.3.2 of the opencsv jar be appropriate or would 3.7 be better?

  5. Hi Ralph,
    Thanks for above reference document,
    Could you please suggest how to download all attachments under workitem in a single step.
    I have 10 Project area’s each project area have 5 work item types, I need to download all attachments Project area wise under work item attachments tab.

    Thanks,
    Mohib

  6. Hi Ralph,
    do you know if there is a way exporting workitems through WCL when using dynamic query that gets some column value as input?

    Thx,
    Ariel

      • Thx Ralph,
        So This means that we can use dynamic queries only on ui? no way to use them on script?

        Thx,
        Ariel

      • Have you tried to use them with WCL? If so, did they work? If not, what was the issue?

        As I have never tried such a query with WCL and I assume there must be some special capability to run them without a UI to provide the query parameters, my assumption is, they will not run with WCL. This is what I already answered.

        Why am I answering again?

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.