Is there a way to know parent job number from child job ?
I use JobDeliveryStatus API to produce job's report.
I want to add parent job number when the job is a group job's child.
I guess my first question would be, why do you need to be querying for details on the child jobs? If you query for the parent, you get the data for all of the children. And we generally avoid giving child job information to our customers in a vacuum - we want them to work from the parent.
Having said that, it does seem that it is possible to get this information, but you would need to use JobDetal instead of JobDeliveryStatus. With JobDetail you can request specific fields to be returned. In this case if you used something like this:
You would get back a result that included something like this:
To be sure, you would want to check the job_group_status and make sure it says "child", and then the parent_job would give you the parent job number.
If you're going to be doing this a lot, then JobDetail is generally more efficient than JobDeliveryStatus, so you might want to consider using that anyway.