I have defined a \task sectioning command and a subtasks-list as in this MWE:
\documentclass{article}
\usepackage[hidelinks]{hyperref}
\usepackage[loadonly, explicit]{titlesec}
\titleclass{\task}[1]{straight}
\newcounter{task}
\titleformat{\task}
[hang]{\normalfont\Large\bfseries}{Task \thetask:}{1ex}{#1}
\titlespacing*{\task}
{0pt}{3.5ex plus 1ex minus .2ex}{0ex plus .2ex}
\usepackage{enumitem}
\newlist{subtasks}{enumerate}{1}
\setlist[subtasks]{label=\alph*),%
ref=\thetask\,\alph*),%
format=\normalfont\large\bfseries,%
itemsep=1.5ex plus 1ex minus .2ex,%
before=\newcommand{\subtask}{\item},%
after=\vspace{0.5ex}}
\begin{document}
\task{first task}
\begin{subtasks}
\subtask\label{some_subtask}
Some subtask
\subtask
I am referencing \ref{some_subtask}.
\end{subtasks}
\task{another task}
I am referencing \ref{some_subtask} again.
\end{document}

What I would like to do is to have the \ref appear differently depending on if it is called in the same \task as the \label (just as "a)") or not (as "1 a)" as above).
It should also be compatible to hyperref.
Is this possible?

\refis inside/outside the environment. Only changing the format of the labels is not enough. – Sigur Oct 25 '14 at 13:19