Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,361,591
Community Members
 
Community Events
168
Community Groups

How to set fixVersion asApp?

I'm trying to set fixVersion of issue asApp but can't figure out how to. 

My call looks like 

const response = await api.asApp().requestJira(route`/rest/api/3/issue/${issueId}?overrideScreenSecurity=true`, {

    method: 'PUT',

    headers: {

        'Accept': 'application/json',

        'Content-Type': 'application/json'

    },

    body: JSON.stringify(body)

});

but I'm receiving status code 400 with the message Field 'fixVersions' cannot be set. It is not on the appropriate screen, or unknown.

 

When asking for my permissions calling

const getResponse = await api.asApp().requestJira(route`/rest/api/3/issue/${issueId}/editmeta?overrideScreenSecurity=true`);

An empty list of fields is returned. 

I've tried updating the permissions but not 100% sure of what to change. I've added Application access to a number of permissions and selected the only option in the dropdown (Jira Service Desk). Is this the way to give my addon access? 

The permissions I've given is: 

  • Browse Projects
  • Edit Issues
  • Resolve Issues
  • Transition Issues

1 answer

0 votes

Hi,

Welcome to the community.

Can you make sure that the field FixVersion is on the screen you try to edit.

What I can see it's on the screen. I'm going into Project settings and for my issue type I'm selecting Edit issue, is this correct? If so, Fix Version is on the screen. 

@Mohamed Benziane Do you have any other suggestions for me?

Hi,

can you show us the json body with the fixVersion ?

Absolutely, I've tried bot with and without hyphens on properties to make sure that's not a problem. 

 

const body = {

    'update': {

        'fixVersions': [

            {

                'set': [{'name': version}]

            }

        ]

    }

};

 

Running the same call asUser works fine but that's not an option since the call is made from a web-trigger called by an external system. 

Can you look if the user asApp have the right permission in the project

Suggest an answer

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

An unofficial way to monitor a JSM mail handler for errors

...eturns true if any content is returned for the webResponse.body.data.first s...

716 views 3 20
Read article

Atlassian Community Events