MrRefactoring / jira.js

A JavaScript/TypeScript wrapper for the JIRA Cloud, Service Desk and Agile REST API
https://mrrefactoring.github.io/jira.js/
MIT License
349 stars 46 forks source link

setUserProperty doesn't support set value of a propertyKey #243

Closed hongyin163 closed 1 year ago

hongyin163 commented 1 year ago

Source code as follow:

async setUserProperty<T = unknown>(
    parameters: Parameters.SetUserProperty,
    callback?: Callback<T>,
  ): Promise<void | T> {
    const config: RequestConfig = {
      url: `/rest/api/3/user/properties/${parameters.propertyKey}`,
      method: 'PUT',
      params: {
        accountId: parameters.accountId,
        userKey: parameters.userKey,
        username: parameters.username,
      },
    };

    return this.client.sendRequest(config, callback);
  }

File path:/src/version3/userProperties.ts

Perhaps, there is no data field in RequestConfig, can you help me to fix it?

MrRefactoring commented 1 year ago

Fixed in v2.15.16