Page 1 of 1

FAQ: скрипт для получения менеджера вышестоящего проекта

PostPosted: Sat Oct 06, 2007 8:05 pm
by admin
Получить можно так:

Code: Select all
ArrayList arr = new ArrayList();
String id = task.getId();

while (id!=null)
{
    SecuredTaskBean  tci =  AdapterManager.getInstance().getSecuredFindAdapterManager().findTaskById(task.getSecure(),id);
    String sn = tci.getShortname();

    if ((sn!= null) && (sn.trim().length() > 0))
    {
         arr.add(tci.getHandlerUser().getLogin());
         return arr;
    }

    if (tci.getParent()!=null)
    {
          id = tci.getParent().getId();
    }
    else
    {
        id = null;
    }
}

return null;