Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Error Project Role Type in Automation Edited

Hello, I'm setting up a Project creation automation (which is already working), but in the Permission Scheme creation part, I'm taking the error below when I try to use the "Project Role" type:

HTTP response error body: {"errorMessages": ["Can not deserialize instance of java.lang.String out of START_OBJECT token \ n at [Source: org.apache.catalina.connector.CoyoteInputStream@4f8f6be0; line: 5, column: 38] (through reference chain: com.atlassian.jira.rest.api.permission.PermissionSchemeBean [\ "permissions \"] -> com.atlassian.jira.rest.api.permission.PermissionGrantBean [\ "holder \"] -> com.atlassian. jira.rest.api.permission.PermissionHolderBean [\ "type \"]) "]}

This automation is being done by Plugin Automation and this is the only part that is not working, follow the code of the Scheme of permission:

{

    "permissions": [

      {

        "holder": {

        "parameter": "Administrators",

        "type": {

          "projectRole": "10002"

           }

        },

        "permission": "ADMINISTER_PROJECTS"

        }

   ],

   "name": "{{ProjectKey}} - Permission Scheme"

}

 

Can someone help me?

1 answer

1 accepted

1 vote
Answer accepted

Hi @Andreza Nascimento Santos welcome on th ecommunity :). I think your JSON is not valid. You should use (I guess) following JSON to specify holder:

"holder":{
    "type":"projectRole",
    "parameter":"10002"
}

Let me know, if it won't help :), Thank you. 

Thanks for the answer. Unfortunately it's still not working, but the error has changed, but I can't identify the error in json.

{"errorMessages":["Unexpected character ('â' (code 226)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: org.apache.catalina.connector.CoyoteInputStream@750b4c14; line: 6, column: 18]"]}

 

{
"permissions": [
{
"holder": {
"parameter": "10002",
"type": “projectRole”
},
"permission": "ADMINISTER_PROJECTS"
}
],
"name": "{{ProjectKey}} - Permission Scheme"
}

Is this characted contained in your ProjectKey?

I checked and that characted is not in ProjectKey, I really don't know what it can be anymore.

I do not know too, but could you share the whole configuration. We might find something :)

I really don't know what the problem was, but I redid the json and it worked!

Final result:

{
"permissions": [
{
"holder": {
"parameter": "10002",
"type": "projectRole"
},
"permission": "ADMINISTER_PROJECTS"
}
],
"name": "{{ProjectKey}} - Permission Scheme"
}

Thanks for the help!!

Ok, GREAT JOB :) 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
Community showcase
Published in Jira Service Management

Announcing Mindville Insight is now part of Jira Service Management!

Hello Community! We’re excited to announce that Mindville Insight’s asset and configuration management capabilities will now be integrated into Jira Service Management Premium and Enterprise plan...

751 views 12 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you