Using ?web.items in a pull request page, the bitbucket.pullrequest.action client web item shows that the client context should contain a pullRequest key and only that key. However, the following code returns request and currentUser as the only keys present in that context.
atlassian.xml client web item:
<client-web-item key="pr-item" name="Pull Request Action" weight="50" section="bitbucket.pullrequest.action">
<label>My Pull Request Action</label>
<condition class="java.path.to.conditions.classes.PrintContextCondition"/>
</client-web-item>
PrintContextCondition.java:
@Override
public boolean shouldDisplay(Map<String, Object> context) {
System.out.println("Printing context...");
for (String key : context.keySet()) {
System.out.println(key + ": " + context.get(key));
}
return True;
}
logs:
[INFO] [talledLocalContainer] Printing context...
[INFO] [talledLocalContainer] request: org.apache.catalina.connector.RequestFacade@61279cea
[INFO] [talledLocalContainer] currentUser: InternalNormalUser
{id=1, username=admin}
Is this a known bug or am I doing something wrong? I do see my client web item populating in the correct area of a pull request overview page.