It's all about the answers!

Ask a question

How get the work item used to checkin a particular file


Nayeem M (3135) | asked Mar 27 '15, 7:53 a.m.
edited Mar 27 '15, 6:31 p.m.

Is it possible to get the work item used to checkin a file/Changeset to a particular component of a Project area?
For Ex if file PropertyReader.java has been modified by Developer A most recently using work item 123456 , is it possible to get this number
Using scm show history  command we can get the Change Set details.

 scm show history -r $URL -u $userId -P $pwd -w $ws --component icdp_core_as /source/common/Adapters/com/bac/icdp/consumer/common
/PropertyReader.java

Change sets:
  (1539) ----$ Json "Lenderview_ForwardFits" 03-Feb-2015 07:35 AM
  (1259) ----$ Joshi, issue fix." 26-Jun-2014 05:17 AM
  (1260) ----$ Dinesh "changed and added new" 16-May-2014 05:24 AM
There is additional history available before this point.

Can i get the Work Item used for the Change set using JAVA or SCM?
  (1539) ----$ Json "Code review changes" 03-Feb-2015 07:35 AM





One answer



permanent link
Shashikant Padur (4.2k27) | answered Mar 29 '15, 11:18 p.m.
JAZZ DEVELOPER
edited Mar 29 '15, 11:18 p.m.
I believe the "-v/--verbose" option to 'scm show history' should list you the workitems associated with each of the change sets. If not, you can use 'scm list changes <changeset alias/uuid>' to list the changes and workitems.
By the way, if you are using this in a script you could use the --json option to print the output in json format.

Comments
Geoffrey Clemm commented Apr 05 '15, 11:41 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I would strengthen the guidance in the last sentence to say:
If you are using this in a script you should use the --json option, in order to ensure your script keeps working in later releases (the non-json format can change release to release, but the json format does not).

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.