Skip to content

Refresh data ViewForm after submit Form with Request (API) #72

@alphcom

Description

@alphcom

I created a script that called a WebHook function (API) that met the days of the request fields.
Unfortunately when the submit function is finished, the info is not updated in the display view, how to do?

ScriptAPI-Refresh

Script :

$(function () {
  $('#issue-form').submit(function () {
    const parentIssueId = ViewCustomize.context.issue.id;
    const StatutId = $('#issue_status_id').val();
    const IssueDemandeId = $('#issue_custom_field_values_10').val();

    if (StatutId !== '1' && IssueDemandeId !== null) {
      return $.ajax({
        type: 'POST',
        url:
          'https://XXXXXXXX.XXX',
        data: { issue: parentIssueId },
        dataType: 'html',
        success: function (data) {
          location.reload();
        },
      });
    }
  });
});

Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions