IFTTT Macro - JIRA Parent Priority

MCL February 20, 2023

I am trying to obtain the parent priority of JIRA ticket through a confiforms IFTTT so I can set the current priority to dynamically change based on inputs received and the parent priority. Any help would be greatly appreciated as I am currently unable to ID the parentPriority and not quite sure how to conduct the comparisons of text data. 

 

My goal for $finalPriority:

if impact > parentPriority: 
finalPriority = priority of impact map
else if parentPriority > currentPriority:
finalPriority = parentPriority
else
finalPriority = currentPriority

Impact to Priority mapping: 

"Critical": "Blocker - P0", 
"High": "Critical - P1",
"Medium": "Major - P2",
"Low": "Minor - P3",
"Informational": "Low - P4"

 

 

Prep JSON: 

#set($description = {"Description of the Issue:": "[entry.description.escapeJSON]","Impact Assessment:": "[entry.impact.value]","Data Sources:": "[entry.dataSources.escapeJSON]","Solution/Criteria:": "[entry.proposedSolution.escapeJSON]","Risks and Mitigation:": "[entry.risks.escapeJSON]","CASE#:": "[entry.case2.escapeJSON]"})
#set($panel = {"title":"Request", "BGColor": "#E1F5FE", "BorderColor": "#4FC3F7", "TitleBGColor": "#29B6F6", "type": "[entry.requestType.id]"})
#set($meta = {"labels": ["label1", "label3"], "summary": "[entry.summary.escapeJSON]"})

#if("[entry.requestType.value]" == "requesttype2")
#set($meta = {"labels": ["label1", "label2"], "summary": "[entry.summary.escapeJSON]"})
#set($panel = {"title": "New Detection", "BGColor": "#FFCDD2", "BorderColor": "#E53935", "TitleBGColor": "#C62828","type": "[entry.requestType.id]"})
#set($description = {"Description of the Issue:": "[entry.description.escapeJSON]","Impact Assessment:": "[entry.impact.value]","Data Sources:": "[entry.dataSources.escapeJSON]","Solution/Criteria:": "[entry.Criteria.escapeJSON]","Risks and Mitigation:": "[entry.risks.escapeJSON]","CASE#:": "[entry.case.escapeJSON]"})
#end

 

JSON Section: 




{

"project": { "key": "MY-KEY" },
"parent": { "key": "[entry.category.id]" },
"summary": "$meta.get('summary')",
"issuetype": { "name": "$panel.get('type')" },
"priority": { "name": "$finalPriority" },
"labels": "$meta.get('labels')",
"description": {
"panel": {
"title": "$panel.get('title')",
"bgColor": "$panel.get('BGColor')",
"borderColor": "$panel.get('BorderColor')",
"titleBGColor": "$panel.get('TitleBGColor')",
"titleColor": "#FFFFFF",
"borderStyle": "solid",
"content": {
"Description of the Issue:": "$description.get('Description of the Issue:')",
"Impact Assessment:": "$description.get('Impact Assessment:')",
"Data Sources:": "$description.get('Data Sources:')",
"Proposed Solution/Criteria:": "$description.get('Solution/Detection Criteria:')",
"Risks and Mitigation:": "$description.get('Risks and Mitigation:')",
"Additional Notes or Details:": "[entry.notes.escapeJSON]"
}
}
}
}

 

1 answer

1 accepted

1 vote
Answer accepted
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 20, 2023

Hi @MCL 

Do you have a field in ConfiForms of Jira type that holds a parent issue?

Alex

MCL February 20, 2023

In my fields, I have a dropdown that contains a list of keys that the user selects from, I dont have a JIRA type. 

 

Is there by chance a way to dynamically create one after selecting from the dropdown?

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 20, 2023

I probably misunderstand this completely - but what do you select in a dropdown? 

And how do you know what priority has one or the other "parent" Jira issue?

Alex

MCL February 20, 2023

For the dropdown it looks similar to below. It contains the limited keys I want the user to select from to ensure things are nested appropriately when the JIRA ticket is created. 

My goal is to ensure the entry ID field is used to assign as the parent key for JIRA. 

I also wanted to dynamically set the priority of the JIRA being created based off of the parents priority and impact level. 

 

 

ID                   LABEL
Key-12345    Label for key
Key-23456    New Label 
Key-45678    Interesting thing


Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 20, 2023

Honestly, I am still confused

so, you have a dropdown with some predefined text values that represent the issue key in Jira

And you want to lookup the priority of the issue that corresponds to this key and then use it in the logic described above, right?

Alex

MCL February 20, 2023

Correct, My goal overall is below in steps. 

 

1. Choose between type of request 

- bug or subtask 

2. Choose the parent it belongs to 

- a list of about 10 strings associated to the JIRA keys 

3. Assign priority based on parent and impact 

4. Other description/labeling setup 

5. write to JIRA as a new issue either bug or subtask, assigned to the appropriate parent issue

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 20, 2023

OK, but the question is how to get a priority from an issue that you only have a issue key as text, right?

Here is a small screencast that shows you how to access issue priority

I have a dropdown of issues, then selecting one I am assigning it's value to a hidden Jira field. Through this field I can then access any property this Jira issue has, including priority

 

http://recordit.co/X5uxYT7FSG

 

Alex

Like MCL likes this
MCL February 20, 2023

This aided in solving it, thank you very much for your help. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events