Hi,
I’ve been working on a macro following the feedback-collector example. All was working fine with the macro itself, but I just tried to add it on a new page.
Just as in the example, the macro requires initial configuration. But when I try to load the configuration I get this screen:
My code for the config:
const Config = () => {
console.log("Preparing the config form")
const [ projects ] = useState(fetchProjects);
console.log(projects)
const [ issueTypes ] = useState(fetchIssueTypes);
console.log(issueTypes)
// Note it's possible to select a combination of issue/project type that doesn’t exist.
// This could be addressed by validation after submitting the form.
return (
<ConfigForm>
<Select label="Project" name="projectKey">
{projects.map(project => {
return (
<Option
label={`${project.name} (${project.key})`}
value={project.key} />
)
})}
</Select>
<Select label="Issue type" name="issueTypeId">
{issueTypes.map(issueType => {
return (
<Option label={issueType.name} value={issueType.id} />
)
})}
</Select>
<UserPicker label="Assign to" name="assignee" />
<RadioGroup label="Set reporter as" name="reporter">
<Radio label="Current user" value="author" />
<Radio label="Anonymous" value="anonymous" />
</RadioGroup>
</ConfigForm>
)
};
export const config = render(<Config />);
The manifest
macro:
- key: management-utils-create-issues
function: main
title: Create Issues
description: Auto-create issues from Confluence
config:
function: config
function:
- key: main
handler: index.run
- key: config
handler: index.config
It all used to work fine before, but now it’s failing. Any idea what went wrong?