Accept changes related to a workitem using CLI.
How do I tell the CLI, that I want to accept workitems?The changes to accept can be scoped in one of four ways: all changes in a workspace (default), all changes in a set of one of more components (using --components), all changes in one or more baselines (using --baseline), or a specific set of changes (by specifying the change set aliases, UUIDs, or work item numbers).
3 answers
The documentation is incorrect and is in the process being fixed. We do not support accepting the change set from a workitem. Which version of RTC are you using?
From 3.x onwards, you can deliver the changes from one stream to another as follows...
scm deliver -c <changeset itemid/alias> -s <source stream name/alias/itemid> -t <target stream name/alias/itemid>
Note: The delivery may fail if it results in a conflict. In that case, you have to create a workspace for the target stream and accept the changes from the source stream.
Comments
Yes, it is possible in the RTC Eclipse client. For the cli, it is tracked at https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=181673
You can find the change set as follows... a) "lscm history" on the component will list all the change sets for that component b) "lscm history" on the file will list the change sets where that file was changed c) "lscm list changeset" - you can specify a bunch of options to narrow down your search criteria.
The enhancementrequest sounds as exactly what I need. Can I do anything to promote the request?
/Erling
Please put in a comment requesting that this feature is important for your team. Thanks.
I am not sure for my answer's target but I will try to put my cents.
In our case we do need to deliver the change set that is having workitem Approved state. What we did is
Create formal workspace – Component and Flow to Dev stream(Using SCM Commands)
Unset Target (Using SCM Commands)
Change target to Promoted Stream (Using SCM Commands)
This will change the Status as outgoing changes from DEV to Promoted Stream.
2. Load workspace (Using SCM Commands)
3. Check history Or Status for Outgoing changes. (Using SCM Commands)
4. Manipulate the result from step 3 and get the parent work item status (Can be done using the command line java OSLC utility for checking of the work item status).
5. If Yes then Accept the changes in the promoted stream, if not then Notify the Admin for the status of the work items.
OSLC utility is again a lightweight solution for the actual implementation as this is more towards resource oriented API that can be flexible to extend for other automation as well. The RTC client API is not came in picture when I dig this up for the solution in terms of the tools and build engines. Client API is hard to implement, maintenance deployment where OSLC will required only Basic Java libraries.