Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Mail handler and Epic Link Validator - It is possible?

Deleted user May 11, 2018

Hi,

I have project in JIRA which is using Epic Link Validator (It is only way to require Epic Link on create issue). I want to use create task from e-mail feature, but when issue is creating, from logs i know, that i must specify Epic Link to Create Issue. This is main point of my problem.

I have idea: 

I using Script Runner script so i wanted recognize task created from e-mail and made Script validator which allowing empty Epic Link for this specific tasks. Do you know how i can do it? Meybe you have better idea? Meybe i can add something to the top of description (for example "This task is created via mail") and then check with Script Runner description? To do this i must edit body of mail handler incoming message - It is possible? I can't found any information on Atlassian site about this.

2 answers

1 accepted

1 vote
Answer accepted
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2018

What happens right now? Issues from email can not be created because of the validator? If so, then you need to develop your own mail handler or try to use the JETI or JEMH plugins. 

Deleted user May 22, 2018

Exactly like you said. In logs I can see that my validator for Epic Link doesn't allow create issue. 


We need plugin just for one process and buy license for 2000 persons is impossible, so i must found another way. If I would be able to recognizing tasks from mail I can make a Script Runner Validator and make exception for this, but i can't find any templete or way to edit issues from mail. 

Regards,

Wojciech Miecznikowski

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2018

Then change the ScriptRunner validator with ScriptRunner behaviour and add ScriptRunner post function in which you will check, if the epic link is empty, then you will fill it.

Deleted user May 22, 2018

In this case actually i don't have validator, because when user will be creating a issue and not fill Epic Link Script Runner fill it - probably not correct. This is the point - If i knew where the task is from (User or Mail) i can make validator which don't allow create issue without Epic Link for Users and allow create issue without Epic Link for Issue from mail. I don't know how i can recognize issues from mail handler - this is a problem. Meybe only one way is that create a own mail handler and edit body (description) and add at the something like:

"This task i created from mail."

and then check this in Script Runner.

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2018

If you write a behaviour, a user will not be able to create an issue without an Epic Link. But you will be able to create an issue without an epic link through the Rest Api or Mail.

Deleted user May 22, 2018

I don't understand you or you don't understand me. How I will be able to create an issue without Epic Link through Rest API? If user can't create task without Epic Link, Rest API or Mail Handler can't too create task without Epic Link. 

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 23, 2018

An issue can not be created because of the validator. My idea is to remove the validator and add a behaviour, which will check if the epic link field is not empty. In this case users will be able to create issues via REST API and Mail even if the epic link field is empty.

Deleted user May 23, 2018

Ok! I don't understand you because i never used Script Runner behaviuors ;) Sorry for that. Sounds like good solution for me :). I will check this tommorow. Thanks a lot for help!

 

EDIT: It is a sulution

0 votes
Deleted user May 22, 2018

anyone have idea? 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events