Invalid client context for bitbucket.pullrequest.action client web items

Austin Hacker June 12, 2017

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-trigger-jenkins" name="Trigger Jenkins Build From Pull Request" weight="50" section="bitbucket.pullrequest.action">
      <label>Build in Jenkins</label>
      <condition class="com.kylenicholls.stash.parameterizedbuilds.conditions.HookIsEnabledCondition"/>
  </client-web-item>

HookIsEnabledCondition.java:

@Override
public boolean shouldDisplay(Map<String, Object> context) {
		System.out.println(context.keySet());
		return True;
	}

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.

 

1 answer

0 votes
Austin Hacker June 28, 2017

Apparently this was not the best place to post this question. I did get it answered here: https://community.developer.atlassian.com/t/incorrect-client-context-for-bitbucket-pullrequest-action-client-web-items/5377 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events