I have jira plugin with validator which must check that "Linked Issue" field on creation transition. On this transition IssueLink is not already existed and interface Issue have not default method to get this field.
Do we have other options to get this value?
UPD: answer is found and pinned
If you want to validate this filed on "before creation" trasition you can use
Map<String, String[]> map = ActionContext.getRequest().getParameterMap();
String[] issueLinkTypes = map.get("issuelinks-type");
You can find needful param which goes from frontend in this map.
Hi @Flex Grigorovizch
The class can use:
ComponentAccessor.getIssueLinkManager()
ComponentAccessor.getIssueLinkManager().getOutwardLinks(issue.getId())
ComponentAccessor.getIssueLinkManager().getInwardLinks(issue.getId())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I wrote in question's description that on this stage IssueLink is not existed. It created after validator work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
getIssueLinkTypes
This method return all IssueLinkType in current jira instance
-> perform check -> if your issue link already available -> continue your business code
if dont have the result -> using method to create
createIssueLinkType
then continue your business code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't need to creat it programmatically.
If I don't have the result I want to check is any values were filled on Create Form.
I.e. on creation stage issue also doesn't have "Id" field, because it filled after creation and I do not have to filled it by myself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have jira plugin with validator which must check that "Linked Issue" field on creation transition.
The solution I propose for plugin customization. If without programming, hope other members of community can help you.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I said you that the main problem that on transition before Issue creation. IssueLink is not already created and IssueLinkManager will return null value. I want to know is existed another options to get this value, may be I can get it from http request, or something esle
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let's simplify that.
In the UI, if you want to Link an issue. You need to browse the ticket first. Then you can link the issue using issue link.
The same in plugin, ticket creation process first then from the creation result -> perform link ticket.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I need to validate that linked issue is filled on creation stage.
And if it field is not filled ticket must not create
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.