Inline script in flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 07:03 AM
Hi,
I have form which has flow with jira subflow, once ticket is submitted RITM is closed skipped and it creates Jira task on specific board, but currently there is an issue with passing one of the fields to jira because SN Flow designer is not passing non user input fields in flow designer.
I have Label type field called "Auto-incident", after that there are two checkboxes "Yes" and "No" in the form.
Based on user selection in form, flow should send selected checkbox to jira board, currently it does that but the "Auto-incident" label is not passed, therefore on jira task it shows:
Options
[ ✓ ] Yes
[ ⤫ ] No
I thought it could be possible to create script in flow designer.
So in order to fix that i had idea to put plain text in the flow designer field something like ''Auto-incident'' and there bellow that field it would display from the form which checkbox is checked.
Example output:
Auto-incident
[ ✓ ] Yes
[ ⤫ ] No
If there wouldn't be some special requirements for fields and UI policy, then I would use Multiple choice or select box and there wouldn't be such issue but because requestor wants special logic behind, therefore only solution was to use label and checkboxes in my scenario.
Does anyone have some idea how to deal with this or some script for flow designer I could use? Because currently I have spent already almost two days and feel stuck with no better ideas.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 01:42 AM
Ah okay, this could be a dumb answer, but can't you just add the 'Add-Incident' as the text in the input?
If not, can you explain which input you are populating and how that generates the 'Jira Issue'? Is that a OOB Spoke or a custom action?
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 02:06 AM
In form i have bunch of fields: the one which is causing the issue right now is Auto incident field, which is Label variable.
Bellow this variable there are two more checkboxes, Yes and No, their back end names cbx_yes and cbx_no.
When I open flow designer, use Trigger Service catalog, then under actions Get catalog variables for that catalog item, select all form variables and move them to right side(Selected). There Auto incident label is not visible, only other fields
then in second step I add action from subflow Create Jira issue, which is bit customized and is not entirely OTB. (But the Jira subflow is not the issue in this case).
When form is submited and jira task is created, it does not show Auto-incident field above checboxes but shows the OTB checkbox options. My goal would be somehow replace the Options with auto incident.
This issue wouldn't be caused if i would use Select box or multiple choice fields, but requirement was to use checboxes because for multiple choice and select boxes it wasn't possible to add some specific UI policy actions.
I hope this explains more.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 02:37 AM
Thanks for the detailed explanation, what I want to understand is how the payload of Jira API is constructed. I am not familiar with Jira spoke nor its APIs but I am guessing there is some sort of mappings between RITM variables and request payload within the Subflow.
If you can customize the payload, I believe what you are trying to do is achievable but may need some scripting. Sorry can't be much more help than this but hopefully someone else can.
Cheers