Forums

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

In Structure How Can I set the Sprint of a Bug to the current sprint using Effectors?

James Schnur November 24, 2021

Some users do not have the ability to set the sprint of a bug which causes me to manually set the sprint. I would like to run an effector to set the sprint of the created bug to the current sprint.  

1 answer

1 accepted

1 vote
Answer accepted
Dionathan Lopes _ALM Works_
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 25, 2021

Hi  @James Schnur 

Dionathan with ALM Works here.

If you are using an on-prem version of Structure (7+), you could try the following steps:

  • Click on the first row of your Structure
  • Go to Automation > Effectors > Attribute to Issue Field
    • Give it a name 
    • On the Attribute section, select Formula from the dropdown list
      • Where you see "Enter the formula", please use the following code:

        • if (PARENT{sprint.state} = "ACTIVE"; PARENT{sprint.name})
    • On the Field section, select Sprint from the dropdown list
    • Action section should be Set
    • and on the Limit to section, you could add "Type = bug
    • Click Save and Run

Basically, it is checking the state of its Parent Sprint, and if it is "ACTIVE", it means that the Sprint is the current one, so it will set the bug to it.

Please let me know if it does help.

Best Regards,
Dionathan

James Schnur December 8, 2021

Hi Dionathan, yes the suggested solution did work and thank you for it.  One question.. is there a way I can populate the bug with the current sprint versus the parents sprint?

Thank You

Like Dave Rosenlund _Trundl_ likes this
Dionathan Lopes {ALM Works}
Atlassian Partner
December 8, 2021

Hi @James Schnur 

You are always welcome.

The Sprint field from Jira only accepts one Sprint name at a time. So, if you need to write something like the below in your Bug: 

Bug's Current Sprint: Sprint X / Parent's Sprint: Sprint Y

then, you will need to create a new Text Custom Field and change the Effector configuration to write the value to this new field.

The steps will be the same, just need to update the Field with the new custom field name, and the formula code will be something like this:

 

CONCAT ("Current: " CONCAT sprint.name
CONCAT " / Parents: "
CONCAT PARENT{sprint.name})

 

It should look like the below:

image (3).png

 

Here is the result of the above example in the Bug View Screen (Custom field name: Custom Sprint):

 

image (4).png

Hope that helps.

 

Best Regards,
Dionathan L
www.almworks.com 

Like Dave Rosenlund _Trundl_ likes this
James Schnur February 23, 2022

Hi Dionathan -  what you provided worked wonderfully!  Now that our process has changed I need some additional help.   Is there a way to apply the current active sprint in the project (not the one assigned to the parent) to a bug in a certain status.  

David Niro
Atlassian Partner
February 23, 2022

Hello @James Schnur ,

David from ALM Works here.  

In order for the solution provided by @Dionathan Lopes {ALM Works} to work, there needs to be another issue from which we will derive the active sprint value.  Dionathan has suggested using the Parent issue.  

In your new process, what issue should be used to identify this value?  Unfortunately it is not possible to just reference the Active Sprint through Formulas.  The value has to be pulled from another issue.

You may also consider looking into Scriptrunner by Adaptavist.  They have a built-in post function that you could use to auto assign an issue to the active sprint on status transition.

Please let me know if this helps clarify the solution, or if I have misunderstood the request.

Best,
David

Like # people like this

Suggest an answer

Log in or Sign up to answer