IBM RTC 6.0.2 Build definition ant- get WI attributes
One answer
If you talk about the build script you finally call in the build, you would have to use the SCM command line or other means to do what you want.
Compare https://jazz.net/help-dev/clm/topic/com.ibm.team.scm.doc/topics/compare_ex.html , checkin, deliver, show status can show work items. To get the status of a work item you would need to create your own automation e.g. the work item commandline https://rsjazz.wordpress.com/2017/03/29/the-work-item-command-line-is-now-open-source/ has code that could be used for this kind of stuff. There is no built in capability.
also see https://jazz.net/library/article/195