Add field to PR?

I have a client asking if we can add a per-user field to the PR screen. Once filled out, I would need to send that field’s value to Jira (the user is authenticated in both systems - SSO). I am quite familiar with Jira add-on development and have a clear vision of the Jira side of things, but I can’t seem to find good info on Bitbucket.

  1. Is it possible to add a custom field to the PR screen?
  2. Can this field be per-user?
  3. Is there a “trigger” on update/save of that custom field that I could tie into to make the Jira API call?

A dialog/wizard approach would also work.

More detail:
It’s a time tracking field - so their developers don’t have to go into Jira and find the correct issue to assign the time to (their Jira issue hierarchy is complex). They fill it out during the review and we would attach it as a work log to the correct issue.

1 Like

Hi @DerekWhite, if you want to customize the Bitbucket Pull Request screen, in Bitbucket 7+, you can start using Client-Side Extensions.

You can check the guide on how to start using CSE:
https://developer.atlassian.com/server/framework/clientside-extensions/guides/introduction/

Here is the link to the plugin project template you can use to develop your custom plugin:
https://bitbucket.org/atlassianlabs/bitbucket-client-side-extensions-template

  1. Can this field be per-user?
  2. Is there a “trigger” on update/save of that custom field that I could tie into to make the Jira API call?

I can suggest creating a custom REST endpoint in the plugin that can communicate with the frontend part.

There are a couple of guides related to plugin development you can check here:
https://developer.atlassian.com/server/bitbucket/how-tos/beginner-guide-to-bitbucket-server-plugin-development/

Thanks,
Maciej Adamczak
Atlassian Developer

2 Likes

@madamczak Thanks for pointing out CSE. It does seem to provide a pathway for what my client needs and verifies their request is worth pursuing further.

Much better than whatever custom field based Jira-type system I was thinking along the lines of. Tysm!

1 Like