getLicenseAssignments pageToken returns null value

オープン
#193 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
javascript
領域
api

調査の方向性

advanced/adminSDK.gs を開いて getLicenseAssignments を調べ、特に 212 行目と 220 行目付近のページネーションロジックを確認してください。maxResults を 1 に設定して問題を再現し、1 ページ目以降の結果を取得できることと、まだユーザーが残っている場合に pageToken が設定されることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

Expected Behavior

getLicenseAssignments should return all the users in the specified domain. PageToken should be populated to allow calling more than 500 results.

url: https://github.com/googleworkspace/apps-script-samples/blob/master/advanced/adminSDK.gs

Actual Behavior

getLicenseAssignments only returns the first page and the PageToken value is null. Also, the while(pageToken) is on the wrong line. It is currently on line 212 and should be on line 220.

Steps to Reproduce the Problem

  1. Call getLicenseAssignments and request 500 as the max result. Assuming there are more than 500 users, you should get a list of 500 users.
  2. Change maxResults to 1 and you should only get one result and pagetoken is null.
主要言語
JavaScript
スター
5.2k
フォーク
2k
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

googleworkspace/apps-script-samples のほかの issue

googleworkspace/apps-script-samples の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。