Have a "validator" on the filed "Request Type"

Ianis June 11, 2021

Hi Atlassian community

I'm having an issue with the field Request Type.

In our Jira Service Management we use several workflow, issue type and request type.

Sometimes, customers don't use the right request type so we (agent) have to move the ticket to another issue type. This operation can erase the request type because we are using a different issue type . So we have to manually affect a new request type. That's okay but sometimes we forget to reaffect the request type and that's a problem for the reporting at the end.

So, i tried to add a validator to my workflow to make Request Type required to sold the isssue.

Test 1 : From Jira (not from customer portal) i  create an issue with no request type, the validator is blocking the transition--> Fine.

Test 2 :  create an issue from the customer portal -> a request type is affected. Then i move the issue to another issue type -> the request type is now blank. I do the transition : the validator didn't stop me.

I think in back office the request type field has a value (the one from the creation) so the validor doesn't stop the transition. But in front office Jira doesn't show me the value because it's not a value affected to the current issue type. I wish that validator stop the transition and the agent apply a correct value to the request type field.

Someone have a tips for me ? :)

 

Kind Regards

Ianis

5 answers

1 accepted

2 votes
Answer accepted
Jeret Shuck June 25, 2021

Hello everyone! I have a workaround that's working! It's an automation that simply sets the "Customer Request Type" to "Null" when the issue type changes.

 

Work around:
Create a new automation:

  1. Use the Field value changed the trigger
  2. Selecting the Issue Type field for the Edit and Transition operations
  3. For action, pick Edit Issue action
  4. Select More Options and paste de JSON below:
{
    "fields": {
        "Request Type": null
    }
}

 

And wala! 🎉 My validator is now working, thus blocking my team from closing an issue when it's been moved, and the customer request type has not been re-populated. Hope this helps!

Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 25, 2021

Hi @Jeret Shuck,

Thank you for sharing! 

I was about to post it here too. I talked to Yuri and he mentioned that found this workaround where the automation will clear the request type field. With this, the validator will work, because the field will be really empty.

I’m glad that we could help!

Kind regards,
Angélica

Like Yuri Moura likes this
Ianis June 29, 2021

@Jeret Shuck Awesome! thank you very much!

Like Angélica Luz likes this
Michael Nassette March 7, 2022

This does not seem to work anymore. An Edit Request Type action has been added, which does not allow for the JSON data to get added to trigger the workaround for the validator.

I am essentially trying to solve a similar issue. Whenever the request type is empty, the issue should not be allowed to transition until it has been set to a valid value.
Similar to the original case, when we change the issue type of a request, the request type value gets emptied, and I have not been able to find a way to either prevent this from happening or force a value to be set in any way.

Oscar Travieso September 13, 2022

Hi @Michael Nassette I hope you are ok, the method is still working, in this new Edit Request Type action you can click on More Options and paste the JSON and voila!

 

json.jpg

2 votes
Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 23, 2021

Hello @Ianis and @Jeret Shuck,

Thank you all for reaching out to Community!

When changing the issue type of a Service Management ticket, as you know, the request type will be empty, since it’s not possible to edit this field while moving the ticket.

There is a feature suggesting this improvement:

Now, with this said, the issue that you are facing where the workflow validator is not working properly is due to a bug. 

So, the ticket is moved to another issue type, the request type shows “None”, but if you go to the issue navigator, the request type is still visible, so in the backend, the value is still there and the validator doesn’t recognize the field as empty, that’s why it won’t work:

I recorded a video for you to better understand what happens:

Please, click on “This affects my team” and also watch the bug to receive updates from our developer team.

Kind regards,
Angélica

Ianis June 24, 2021

Hi Angélica,

Thank you for your answer. As you said, I upvote and put me on watcher on the bug.

Kind regards

Ianis

Like Angélica Luz likes this
Jeret Shuck June 24, 2021

I did the same. Thanks for the comment here Angelica. Looks like this bug is from 2018. a three-year-old bug is pretty concerning. Looks like Atlassian may never fix this issue.

 

Furthermore, we can't use "automation" to clear the field or update it in any way. I was hoping I could create automation to trigger when the Issue type changes, but looks like that's not an option either.

1 vote
Jeret Shuck June 22, 2021

I have the exact same use case. Here's my validator:
vivaldi_96sESA0a0W.png

 

On my test ticket, you can see here the request type is blank (after switching the issue type):
vivaldi_bUFQaKTM6u.png

 

And yet, I still have the ability to execute the transition:
vivaldi_LSPCnOEILL.png

 

If anyone out there has a solution or work around let me know!

0 votes
Shahar Nissim May 25, 2022

Hey, This is still working as with the first suggestion - "Edit Issue" and not "Edit Request type" - the automation changing the RT field to be empty and than the validation works.

0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 11, 2021

A couple of questions for you:

  • Are you sure that you have the validator on each of the workflows and the specific transitions that you’re actually exercising?
  • What specific validator are you using? It may be but that validator is actually passing. Are you using set the field must be updated? I think that would be the proper validator.
Ianis June 11, 2021

Hi Jack, thank you for your answer.

  • i had the validor on only one workflows and transition but i'm sure that i made my test on it ;)
  • i use the validator "Field Required Validator Field  / must not be empty during the transition."

You advice me to use the validator "Field has been modified Validator" ? I'll test it

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events