slackapi / deno-slack-hub

Connectors used to build coded workflows for Run on Slack apps using Deno
https://deno.land/x/deno_slack_hub
MIT License
9 stars 3 forks source link

JiraCloud connector function: how to send custom fields in the payload #39

Closed celso-vts closed 6 months ago

celso-vts commented 7 months ago

While integrating a JiraCloud connector into my Deno workflow, I'm missing how to pass custom field values to both create_issue and edit_issue connector functions.

If I use the same connector functions in a workflow builder, I can see an "additional inputs" section in the form. image

Let me know if more detail is needed.

zimeg commented 7 months ago

Hey @celso-vts 👋 Thanks for writing in and cool to see that you're exploring this! The "additional inputs" for these functions were added in https://github.com/slackapi/deno-slack-hub/commit/841347443cef7b56b78f75a3d59800dad3b7cb9c but have not yet been included in a released. If you want to experiment with these right now, you can update the deno-slack-hub in your import_map.json to the following:

{
  "imports": {
    "deno-slack-hub/": "https://raw.githubusercontent.com/slackapi/deno-slack-hub/1667fb9725a998e71cb7dd7da25470020dbfb2fa/src/"
  }
}

And assign additional inputs with the custom_fields attribute:


SampleWorkflow.addStep(Connectors.JiraCloud.functions.CreateIssue, {
  atlassian_access_token: {
    credential_source: "END_USER",
  },
  jira_domain: "https://jira.example.com",
  project: "TOOLS",
  issueType: "bug",
  summary: "Missing custom fields in JIRA connector",
  custom_fields: {
    reporter: "@celso-vts",
  },
});

After adding this step, workflow values can be checked with the slack manifest command if you're wanting to check that this all looks right.

Please let me know if this seems to unlock this attribute for you and if it's working right, or if you find other issues. I'll check on our release timeline for this specific field and will share any updates!

WilliamBergamin commented 7 months ago

0.2.1 just got released, which should have the latest changes for "additional inputs"

{
  "imports": {
    "deno-slack-hub/": "https://deno.land/x/deno_slack_hub@0.2.1/"
  }
}

@celso-vts let us know if this resolves the issue