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

How to set fixVersion asApp?

Christofer Hellqvist September 18, 2022

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
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 19, 2022

Hi,

Welcome to the community.

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

Christofer Hellqvist September 19, 2022

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. 

Christofer Hellqvist September 21, 2022

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

Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 21, 2022

Hi,

can you show us the json body with the fixVersion ?

Christofer Hellqvist September 21, 2022

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. 

Christofer Hellqvist September 26, 2022

@Mohamed Benziane Any updates?

Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 27, 2022

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

Christofer Hellqvist September 27, 2022

@Mohamed Benziane 

As I wrote in my original post I'm not 100% sure of how I'm setting the correct permissions for the app. I can't find any specific user named asApp but I've added Application access (for Jira Service Desk which is the only option in the dropdown) for 

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

 

Is it the correct user? What is the right permission?

Christofer Hellqvist October 3, 2022

@Mohamed Benziane 

How is it going? Is my setup correct? Any other ideas? Is it really supposed to be this hard to set the fix version via a web trigger?

Suggest an answer

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

Atlassian Community Events