[JBTM-1970] Support for first and last resources
Merge branch 'JBTM-1970'