Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Add repository name to 'Component' field when branch is created

Craig Cinder January 13, 2022

Background:

Currently, the way our workflow is set up is when a developer is working on a ticket, they must add add the release that the ticket will be apart of to the "Fix Version" field on the Jira ticket. The name of the release is based on the name of the repository where the branch is created to work on the ticket. So basically, our release name format is "[repository name][Repository Version Number]". 

We are trying to automate this process using a mixture of Jira automation and jitterbit functionality. Ideally, what we want to happen is:

  1. When a branch is created, the repository name of the created branch should appear in the Components field.
  2. Jitterbit should then be triggered to look to the Component field and then identify the latest release with that repository name and add that release to the 'Fix Version' field. 

Problem:

We are currently having trouble with the first step in this process and hoping someone could help us. We currently have the following automation rules set up:
2022-01-13 15_55_11-Automation - Jira.jpg

When a branch is opened, the repository name should be added to the components field and the labels field (with the labels field acting more as a check to see if its working since it doesnt rely on pre-filled choices like the components field.)

We then added all of our repository names to the list of components and tried running the automation. Unfortunately, we are having some weird mixed success where repository names are working and some are not. 

For Example, api-usage, one of our repository names works correctly and writes to the component field when the branch is created:
2022-01-13 15_58_47-[AT-3765] Test Jira Automation with Craig - Jira.jpg

However, p44, another repository does not work, despite being included in the components list and the label field updating correctly:2022-01-13 16_03_01-[AT-3765] Test Jira Automation with Craig - Jira.png2022-01-13 16_01_55-[AT-3765] Test Jira Automation with Craig - Jira.png

Would anyone be able to help figure out what we may be doing wrong?

 

2 answers

0 votes
Craig Cinder February 1, 2022

Im a fool. Turns out there was a space in front of a few component's names when I entered them in. so p44 was actually _p44 when you edited the component. 

0 votes
Charlie Gavey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 13, 2022

Hi Craig,

Are you able to share what you're seeing in the Audit Log when the rule is running?

You can read more about using the Audit Log to troubleshoot here: 
https://support.atlassian.com/cloud-automation/docs/what-is-the-automation-audit-log/

Cheers,

Charlie

Craig Cinder January 17, 2022

@Charlie Gavey I used the audit log to try and diagnose the problem. Unfortunately, it doesn't seem to help with this particular issue much. 

The rule always has a status of "Success" so it is executing when a new branch is created. However, it always says the issue in question was edited successfully, even when it does not. 

2022-01-17 12_27_13-Automation - Jira.png

Craig Cinder January 20, 2022

After monitoring this a bit more, I think the issue occurs when my repository name's contain a non-alphabetical value.

So for example, the following values worked and were successfully added to the component field:

  • settings
  • scheduler
  • quote
  • smc
  • rates

However, the following values where unsuccessful and all contain non-alphabetical values:

  • ltl-contract
  • p44

Does anyone possibly know of a way to get arount this?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events