Forums

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

In my Jira Automation rule to create an issue, how do I prompt the user to input the sprint value?

Ian McLarney September 12, 2023

Rule attributes:

  • Rule is scoped to a company-managed project.
  • Rule is triggered manually.
  • Rule creates an issue that is linked to the trigger issue.

Desired outcome: Prompt the user to select Sprint from the board's sprints.

Considerations:

  • The trigger issue may or may not be added to a Sprint yet.
  • The resulting issue may or may not be added to the same Sprint as the trigger issue.

Challenge: The rule allows me to prompt the user for these 5 types of raw input but not existing fields in the sprint board:

  • Short Text
  • Paragraph
  • Dropdown
  • Number
  • Checkbox

3 answers

1 vote
Jack Brickey
Community Champion
September 12, 2023

Hi @Ian McLarney ,

if I understand you correctly, all the details aside, you wish to incorporate a user prompt as part of an automation rule. If this is correct, unfortunately, it is not possible. There is no concept of prompting a user during an automation rule. Maybe there is a different approach? I wonder if it's possible given that this is a manually, executed rule, simply use a transition and require the necessary input fields?

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 12, 2023

Hi @Ian McLarney 

Yes, and...to Jack's answers:

Other customers have suggested making more information available to populate the user inputs for the manual trigger, such as described here: https://jira.atlassian.com/browse/AUTO-744  You may watch or vote for that suggestion to see progress.

However for your scenario, the input would need to be loaded from a REST API function call to grab any open sprints for the project.  That seems beyond the scope of that original suggestion and so you may want to add to it (or create your own suggestion).

Back to your current need, you describe triggering this rule and creating an issue, populating the sprint based on a user input.  Let's think about some work-arounds for now:

How many sprints, in advance, does the team create? 

  • If just one, could the issue just select the next, open sprint?
  • If multiple, could a time frame be selected instead (e.g., +2 weeks, +4 weeks, etc.) and then use that information to find the next sprint?  Assumption: when sprints are created, the start/end dates are set.

Kind regards,
Bill

0 votes
Ian McLarney September 12, 2023

Hey Jack, thanks for reaching out.

I think it is possible. My rule already prompts the user for input (a number), which it uses to set a field in the resulting issue.

Here are some Jira docs that describe this feature. Also, I've added a screenshot of my view when I configure the rule's trigger event.

Screenshot 2023-09-12 at 12.38.46 PM.png

Jack Brickey
Community Champion
September 12, 2023

Well!!! Lesson learned!!!

I have never seen this previously. I am now going to need to go dig in and understand how that works. More specifically can it reference existing custom fields or simply creating some form on demand? How/where is this data placed on the issue. From what you have stated here and what I observe initially is that it is the latter. Which makes sense actually. Though maybe not desirable. I am going to play around with it a bit.

Jack Brickey
Community Champion
September 12, 2023

Ahhhhh, ok so this is definitely newish. I was getting stumped as I could not see where this information would be displayed. It appears, in fact, that it is not. Rather, what they have done is provided a means of incorporating variables with these fields such that you can use those variables within the context of the rule. So you should be able to achieve your goal, simply by referencing the variable that is created to fill in the desired custom field. At least in theory. In rereading your original post I see that you want to have them fill in the sprint. However, the problem with this in the context of the prompt feature is that the user could enter invalid information that would not align with your sprint naming conventions. In any case, it's something you'll need to play around with a bit.

let me know if this makes sense and let me know if I can possibly assist further. Again, this is all new to me as well. So it becomes a trial and error thing.

Ian McLarney September 12, 2023

This makes sense. I think it is error-prone though. In another Community post, a user recommended a regular expression to parse user input. Since sprints are ephemeral, and their names are creative, I don't think this is a viable solution.

I described the desired outcome in my first message. I'd really like to be able to insert any of the Project's fields into the user input form as if it were a create issue screen. In this case, I want to insert the Sprint field.

Jack Brickey
Community Champion
September 12, 2023

Understand but given that isn't possible using the Automation Prompt it might be good to seek a different approach. You could also consider using an addon like Scriptrunner which might work for your desired implementation.

Like Ian McLarney likes this

Suggest an answer

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

Atlassian Community Events