Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Using Power Automate to Edit Jira Issue

Rajat June 23, 2022

Hello, this is my first time on JIRA Community, we are trying to use Power Automate to edit a JIRA issue, however, when we are passing values in fields text field, we are getting errors, attaching screenshots:

This is the flow body that we are using, we are trying to update summary field.

JIRAPowerAutomateFlow.jpg

 

This is the error that we are getting:

JIRAPowerAutomateErrorMessage.jpg

 

we want to know how should we pass the field/update parameters values, so that it should get updated for the respective ticket ID.

6 comments

Comment

Log in or Sign up to comment
Jeff Stanier July 11, 2022

I'd like to know how to do this too.  The documentation is not clear.

Hari Narayn July 25, 2022

You need to put it as json, like below. it will work

j1.png

Arocha Mahapannaporn June 27, 2023

I put it as json like above but I got an error saying "Field 'labels' cannot be set. It is not on the appropriate screen, or unknown." Any solution to this?

Arocha Mahapannaporn June 28, 2023

"Field 'labels' cannot be set. It is not on the appropriate screen, or unknown." is solved by using Update operation with Labels.
https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/

Jeff Stanier July 26, 2022

@Hari Narayn  Thank you.   Do you know if there is a way to add an attachment through the JIRA edit issue operation as well?

Gomez_ Daniel August 9, 2022

can you pull from a sharepoint list and update jira fields?

Larry Hofmann January 7, 2023

Yes, there are MS PA actions for getting SP list items and using that data to update Jira fields.  I have multiple MS PA flows that do this.

Like Gomez_ Daniel likes this
Gomez_ Daniel January 9, 2023

do you need Jira premium version to do this?

Larry Hofmann January 10, 2023

You need to have a Premium Power Automate license for the user that creates/runs the flow.

Like Gomez_ Daniel likes this
Gomez_ Daniel January 10, 2023

thanks for the quick response! 

Larry Hofmann January 10, 2023

My pleasure.

Michael Bruno January 10, 2023

Is there any way to update the status via JSON using the JIRA edit feature? I know status is not quite the same as something like priority and assignee.

Larry Hofmann January 10, 2023

Yes, I do believe that it is possible and I am doing something similar with some other custom fields, and in our Jira environment the issue status is a custom field. You will just have to do some digging to make sure that you get the correct field/JSON.

Larry Hofmann January 10, 2023

Here is an example of the JSON that I am using to do multiple updates to a single issue at once:

{
  "reporter": {
    "id": "60abb57a920950006f6cd28b"
  },
  "customfield_10023": "84",
  "priority": {
    "id": "3"
  }
}

Like # people like this
Michael Bruno January 10, 2023

That's a good call, I definitely will need to keep custom fields in mind for the future. We don't store our issue's status as a custom field though, we just store it in the status. From what I've seen so far, I think I'm supposed to do something with the transition ID, but I just haven't been able to figure it out yet. 

Larry Hofmann January 10, 2023

That is a good point in return. I have also used PowerShell to update the status of issues and in that case, you are correct that it was an issue transition that needed to be done for it to work properly.

 

If you want to go down that "rabbit hole", I used the JiraPS PowerShell module and the PS command is Invoke-JiraIssueTransition -Issue IssueID -Transition TransitionID

Michael Bruno January 10, 2023

No need to go down the rabbit hole, I think. The transition ID is provided in the Power Automate for the "Edit Issue". Look at OPs 5th field in the picture.

Like Larry Hofmann likes this
Larry Hofmann January 10, 2023

Good point, I totally missed that.

pasquale_scandurra January 13, 2023

@Michael Bruno Hi Michael. I'm facing the same issue at upadting the a ticket status 

I've filled the transition ID field with the value of the transition I see in my flow

 

screen1.PNGscreen2.PNG

I tried with and without brackets but I still receive the same error. Moreover I don't know If I need to fill more fields. There's no documentation at all. I thank you in advance, Pas

Michael Bruno January 13, 2023

Hey Pas,

Sorry, but I have no better information than you do. I have tried just about every method I can think of for formatting the TransitionId and I haven't been successful getting it to change. Without access to the underlying API or better documentation I have no clue on how to make it work. It does seem a field is required to use this Automate action though, so if you are going to keep trying, I would recommend putting in a field value that just changes a field to the value it already is (i.e., change existing priority medium to priority medium). 

I would suggest reaching out to Microsoft support on this. The last time I reached out they didn't seem super knowledgeable with the JIRA connectors though, just warning you if you want to try that.

You can always try a custom connector option too, but I understand that would be really annoying, especially with the need to hide your API token (probably via key vault/secret server, at least that is getting a lot easier to do). The ability to do it without hiding the token was the main reason we wanted to use this built-in connector, but without better documentation or clarity on the underlying API call your options are pretty limited. If you're trying to make more advanced calls than just creating an issue or changing an assignee you might have to bite the bullet on doing the call through a custom connector.

Like Giovanni Arriagada likes this
Larry Hofmann January 13, 2023

If you go the custom connector route and you use Azure Key Vault (AKV), you can use the premium actions for AKV to pull in your API token if you store it in AKV.

Steven Vits December 6, 2023

Is there a way to add comments in an Jira Issue?

tried fields and update column.

{
"comments": [
{
"body": "Comment"
}
]
}

 

{"errorMessages":[],"errors":{"comments":"Field 'comments' cannot be set. It is not on the appropriate screen, or unknown."}}

Michael Bruno February 15, 2024

Update: We built our own custom connector for Jira. It's much easier to make your own API calls rather than using the built in Microsoft supported Jira actions. Jira is just too different across organizations to make a one size fits all solution. The custom connector works great, even if the authorization aspect of it was a pain to set up.

Like Gomez_ Daniel likes this
TAGS
AUG Leaders

Atlassian Community Events