@finesoftware/react-forge-jira
v1.0.5
Published
`@finesoftware/react-forge-jira` is a fully typed abstraction around various [Atlassian Forge](https://developer.atlassian.com/platform/forge/) capabilities, for React. It is part of the [Forge Dev Kit](https://fine.software/forge-dev-kit).
Downloads
78
Readme
react-forge-jira
@finesoftware/react-forge-jira
is a fully typed abstraction around various Atlassian Forge capabilities, for React. It is part of the Forge Dev Kit.
Hook-based Jira API
@finesoftware/react-forge-jira
provides a Hook-based abstraction around @finesoftware/forge-jira-api
. E.g., the issues of fix version v1
can be loaded like so:
import { useContext } from '@finesoftware/react-forge-jira`;
export default () => {
const { data: issues, error } = useIssues({ jql: 'fixVersion = v1' });
if (!issues) {
return <span>Loading...</span>;
}
return <span>{issues.issues.length} issues found</span>;
}
This API is based on SWR. All SWR options (except for fetcher
) can be passed as an optional second argument, e.g. like so:
useIssues({ jql: 'fixVersion = v1' }, { shouldRetryOnError: false });
In addition to the standard SWR options, a skip
flag can be provided to enable conditional fetching.
useIssues({ jql: 'fixVersion = v1' }, { skip: true });
Please refer to the SWR documentation for the full API reference and usage patterns.
The following requests are current available:
useBulkPermissions
(based ongetBulkPermissions
)useConfiguration
(based ongetConfiguration
)useCreateIssueMetadata
(based ongetCreateIssueMetadata
)useFields
(based ongetFields
)useGroups
(based onfindGroups
)useGroupsInBulk
(based ongetGroupsInBulk
)useIssue
(based ongetIssue
)useIssueLink
(based ongetIssueLink
)useIssueLinkType
(based ongetIssueLinkType
)useIssueLinkTypes
(based ongetIssueLinkTypes
)useIssueProperty
(based ongetIssueProperty
)useIssues
(based onsearchIssues
)useIssueTypes
(based ongetIssueTypes
)useMyPermissions
(based ongetMyPermissions
)usePriorities
(based ongetPriorities
)usePriority
(based ongetPriority
)useProject
(based ongetProject
)useProjectComponents
(based ongetProjectComponents
)useProjectProperties
(based ongetProjectProperties
)useProjectProperty
(based ongetProjectProperty
)useProjects
(based onfindProjects
)useProjectVersions
(based ongetProjectVersions
)useTransitions
(based ongetTransitions
)useUser
(based ongetUser
)useUserProperties
(based ongetUserProperties
)useUserProperty
(based ongetUserProperty
)useUsers
(based onfindUsers
)useUsersAndGroups
(based onfindUsersAndGroups
)useUsersAssignableToIssues
(based onfindUsersAssignableToIssue
)
The above list of requests is not complete, however more requests will be added in the future. If you require additional requests (or find a bug), please raise an issue against the Forge Dev Kit.