vpl,
First of all, the syntax for incorporating a variable into a filter expression is not <> but :
\define test_project() {{{ [<my_tiddler>get[projectId]] }}}
However, this still may not work, depending on how you use the macro. It’s tempting to think of macro transclusions as “function calls”, where when you say <<test_project>> you get the result of evaluating their contents as wikitext. But this is not how macros work – instead, the exact text of the macro (with any $text substitutions$ the macro might include) is inserted wherever the <> is used, which in this case is a filter expression in triple curly braces.
Now, this will still work fine if you just say, for instance:
<<test_project>>
In this case, TW replaces <<test_project>> with {{{ [<my_tiddler>get[projectId]] }}}, then sees that wikitext in the body of a tiddler, evaluates it, and gets the project ID. But it won’t work if you try to use it within another filter expression, or as the value of an HTML or widget attribute, e.g., suppose you had a tiddler whose title was this project ID and wanted to transclude it:
<$transclude tiddler=<<test_project>>/>
In this case, TW will be looking for a tiddler called “{{{ [<my_tiddler>get[projectId]] }}}”, and it presumably won’t find it.
If you need to, you can get around this with the $wikify widget:
<$wikify name=“myProjectId” text=<<test_project>>>
<$transclude tiddler=“myProjectId”/>
</$wikify>
In this case, you explicitly tell TW to evaluate the wikitext “{{{ [<my_tiddler>get[projectId]] }}}”, then use the result to transclude the appropriate tiddler.
You can read more on this in the Wikification section of Grok TiddlyWiki.