Forums

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

How do I set the value of Issue Type on a Custom Field on each Jira case?

Bhavik_Shah August 5, 2024

Hi Team,

In our Org analyst have been leaving the default issue type "IT Help" when resolving cases. We have hence introduced a new Issue Type called Initial Triage which will be default set on any new case being created, and at the time of resolving a case a rule will check that the Issue type is not left as "Initial Triage".

For this I have introduced a custom field called var_IssueType. This custom filed is of the type Select List (single choice) and is configured to be set with values such as "IT Help", Change, Bug. Service request etc. I have further put a rule that will check Issue Type and set the value of var_IssueType. The value of var_IssueType if left as Inital Triage will not allow users to resolve a case and present an error message to change the issue type from Initail Triage to something more appropriate.

Now before I put this automation in place which will work well for new cases, I need to need to first search for all existing Open cases in Jira and set the value for custom field var_IssueType based on the current Issue Type. Could you please assist me how to automate this bulk updation on all open cases to read their issue Type and set the value for custom field var_issuetype.

Regards,

Bhavik

2 answers

0 votes
Dick
Community Champion
August 5, 2024

Hi there,

It's far more preferable to change the issuetype, rather than using a second field for the same thing.

You can change the issuetype with an automation with manual trigger, that will show up in the more menu when editing an issue. 

It would be like your dropdown triage menu, only it would trigger a very simple automation that would change the issuetype to a certain value (being the value in the name displayed under this more-menu)

Dick
Community Champion
August 5, 2024

Rule details

  • Name :  Set to Bug

When: Manual Trigger

If issuetype in ("IT Help","Change", "Service Request")

Then: edit Issue

  • issuetype = "Bug"

 

You would have similar automations for Change, Service Request etc. 

 

Dick
Community Champion
August 5, 2024

Moreover, it would save you the hassle from having to bulk copy the issue type of issues already done and dusted, not to mention going without the extra custom field. 

Bhavik_Shah August 5, 2024

Hi Dick,

Thanks for the feedback.

I did want to try a simpler automation, but I could not get the standard Issue type field on the Resolution screen, nor at the resolution workflow step where we intend to put a validator; I could not find the Issue Type field to run a validation against. Hence, I had create a custom field that will hold the value of Issue Type which was being used into validation at time of resolution. Set up is something like below:

2024-08-05_23-06-28.jpg2024-08-05_23-01-44.jpg2024-08-05_23-01-54.jpg

Regards,

Bhavik

Dick
Community Champion
August 7, 2024

Hi Bhavik,

Glad to see your actual question behind the original post :). 
My first impression of your original post was: this person mixes issue types and statuses. 

The act of running one of the scripts I suggested would be your triage action (no need to have a special issuetype for that). You can select the persons allowed to trigger these automations. The entity executing the automation itself would be the actual actor, which can also be defined in the automation: I've created a JiraBot actor especially for this purpose (with the permission to change issues and statuses).

You can extend the simple scripts I provided with a status change ie. to "Approved"

By hiding the status change between "open" and "Approved" for normal people in the project (on the board), the next status in your workflow would only be reachable using the automation. Thus, you can force the issuetype change to be part of the ticket flow.

Hope this makes sense to you. 

 

Dick
Community Champion
August 7, 2024

You would have a workflow similar to this:

 

  • Open
    • Transition with condition set to hide transition from the user (meaning it can only be triggered from a workflow function)
  • Approved
    • Standard transition without a screen
  • In Progress
    • Standard transition with maybe a screen to register work hours etc.
  • Done

 

 

0 votes
Aaron Pavez _ServiceRocket_
Community Champion
August 5, 2024

Hi @Bhavik_Shah 

> Could you please assist me how to automate this bulk updation on all open cases to read their issue

You need to do a bulk update of that field using the bulk update option:

https://support.atlassian.com/jira-software-cloud/docs/edit-individual-and-multiple-issues/

- Run a JQL to find all the Jira issues with the custom field.

- Do the bulk update for those selected Jira issues.

Regards

Dick
Community Champion
August 5, 2024

Though technically, this is exactly what Bhavik asked, this promotes the solution of having two fields describing the same, with all the extra work attached.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events