async function jira_seed_schemes()

in htdocs/js/selfserve.js [618:634]


async function jira_seed_schemes() {
  // Seeds the appropriate dropdowns with current schemes
  const pubresp = await GET("/api/jira-project-schemes");
  const pubdata = await pubresp.json();

  for (const [schemename, schemelist] of Object.entries(pubdata)) {
    const scheme_obj = document.getElementById(`${schemename}_scheme`);
    if (scheme_obj) {
      for (const entry of schemelist) {
        const opt = document.createElement("option");
        opt.text = entry;
        opt.value = entry;
        scheme_obj.appendChild(opt);
      }
    }
  }
}