•  
      request #22580 Creation of new tracker from Jira doesn't work with Jira Server
    Infos
    #22580
    Isabelle Duchet (i.duchet)
    2022-01-14 11:26
    2021-07-27 17:43
    24149
    Details
    Creation of new tracker from Jira doesn't work with Jira Server

    I'm trying to import Jira projects (from Jira server) to Tuleap tracker (Community Edition), but it's not working. Tuleap request Jira API (/rest/api/2/project/search?StartAt=0) but it seems it do not work

    This query : /rest/api/2/project/search?startAt=0 don't work The result : {"errorMessages":["Impossible de trouver un projet avec la clé 'search'."],"errors":{}}

    This query : /rest/api/2/search?startAt=0 works

    We use Jira Server v8.15.0

    Jira import
    12.10
    EL7 (CentOS|RHEL)
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Manuel Vacelet (vaceletm)
    Closed
    2022-01-14
    Attachments
    References
    Referencing request #22580

    Follow-ups

    User avatar

    We have done quite a lot of modifications on this subject lately and most of the blockers should be gone now:

    • versions & fixVersions field are now imported
    • priority is imported on legacy Jira Server
    • fields that are on the edit screen only are imported
    • when links are typed and types are not known at Tuleap side, there is no longer empty artifact after conversion.

    I'll close this request as it's too broad. Do not hesitate to open new requests to address specific issues.


    User avatar

    Thanks for the troubleshooting.

    Would that be possible to share a payload of a issue with its changelog where a user with KEY mismatch got assigned to a ticket ?

    The code end-up re-constructing the URL when it faces a username change in changelog and doesn't know yet the user. The changelog is built with name value of the user AFAICT so I would be curious to know how it's done in this case for JIRAUSER15001/Thomas Olivé.

    User avatar
    Hello Manuel,

    We found the import problem. It concerns our JIRA users.
    It works for him :
    {
    "self": "https://servicedesk.csti.ch/rest/api/2/user?username=k.saintbonnet@csti.ch",
    "key": "k.saintbonnet@csti.ch",
    "name": "k.saintbonnet@csti.ch",
    "emailAddress": "k.saintbonnet@csti.ch",
    "avatarUrls": {
    "48x48": "https://servicedesk.csti.ch/secure/useravatar?avatarId=10344",
    "24x24": "https://servicedesk.csti.ch/secure/useravatar?size=small&avatarId=10344",
    "16x16": "https://servicedesk.csti.ch/secure/useravatar?size=xsmall&avatarId=10344",
    "32x32": "https://servicedesk.csti.ch/secure/useravatar?size=medium&avatarId=10344"
    },
    "displayName": "Kelian SAINT-BONNET",
    "active": true,
    "deleted": false,
    "timeZone": "Europe/Zurich",
    "locale": "en_US",
    "groups": {
    "size": 4,
    "items": []
    },
    "applicationRoles": {
    "size": 1,
    "items": []
    },
    "expand": "groups,applicationRoles"
    }

    It doesn't work for him because of the KEY field no longer matches with the username :
    {
    "self": "https://servicedesk.csti.ch/rest/api/2/user?username=t.olive@csti.ch",
    "key": "JIRAUSER15001",
    "name": "t.olive@csti.ch",
    "emailAddress": "t.olive@csti.ch",
    "avatarUrls": {
    "48x48": "https://servicedesk.csti.ch/secure/useravatar?avatarId=10349",
    "24x24": "https://servicedesk.csti.ch/secure/useravatar?size=small&avatarId=10349",
    "16x16": "https://servicedesk.csti.ch/secure/useravatar?size=xsmall&avatarId=10349",
    "32x32": "https://servicedesk.csti.ch/secure/useravatar?size=medium&avatarId=10349"
    },
    "displayName": "Thomas Olivé",
    "active": true,
    "deleted": false,
    "timeZone": "Europe/Zurich",
    "locale": "fr_FR",
    "groups": {
    "size": 3,
    "items": []
    },
    "applicationRoles": {
    "size": 1,
    "items": []
    },
    "expand": "groups,applicationRoles"
    }

    https://community.developer.atlassian.com/t/different-between-key-and-username-in-jira-api/37936
    https://confluence.atlassian.com/jiracore/gdpr-changes-in-jira-975041009.html?_ga=2.120249608.1099874476.1638355714-2147330018.1627033020

    I will come back to you with a functional feedback next week
    Have a nice week-end

    Best regards,
    Isabelle
    User avatar
    last edited by: Manuel Vacelet (vaceletm) 2021-12-02 11:28

    I tested once again with another project and it works !!!!

    I would be interested by the functional feedback then:

    • How does it look (organization of the fields, etc) ?
    • Are the data consistent with what you have in Jira ?
    • What is missing ?
    • ...

    I updated our tuleap instance and tested twice the import with 2 different Jira projects. I have these errors in worker_log file :

    For that project would that be possible to:

    • Clean-up the jira debug directory
    • Run the import test
    • Get a tarball of the debug directory by email (as you did last time)
    User avatar
    Hello Manuel,
    I updated our tuleap instance and tested twice the import with 2 different Jira projects. I have these errors in worker_log file :

    2021-12-02T10:10:56+01:00 [13507] [info] Got message: {"event_name":"tuleap.tracker.creation.jira","payload":{"pending_jira_import_id":2},"_enqueue_ts":1638436256.611109,"_queued_total":0}
    2021-12-02T10:10:56+01:00 [14156] [debug] Starting to process message: {"event_name":"tuleap.tracker.creation.jira","payload":{"pending_jira_import_id":2},"_enqueue_ts":1638436256.611109,"_queued_total":0}
    2021-12-02T10:10:56+01:00 [14156] [debug] Do we talk to JiraCloud or JiraServer ?
    2021-12-02T10:10:56+01:00 [14156] [debug] GET https://servicedesk.csti.ch/rest/api/2/serverInfo
    2021-12-02T10:10:57+01:00 [14156] [debug] Response: 200
    2021-12-02T10:10:57+01:00 [14156] [info] Instantiate JiraServerClient
    2021-12-02T10:10:57+01:00 [14156] [debug] Set Jira client in debug mode
    2021-12-02T10:11:01+01:00 [14156] [error] Query `GET https://servicedesk.csti.ch/rest/api/2/user?username=JIRAUSER13704` was not successful (code: 404, message: "Not Found"). Jira errors:
    L'utilisateur 'JIRAUSER13704' n'existe pas
    Jira warnings:



    2021-12-02T10:41:31+01:00 [13510] [info] Got message: {"event_name":"tuleap.tracker.creation.jira","payload":{"pending_jira_import_id":3},"_enqueue_ts":1638438091.409728,"_queued_total":0}
    2021-12-02T10:41:31+01:00 [16556] [debug] Starting to process message: {"event_name":"tuleap.tracker.creation.jira","payload":{"pending_jira_import_id":3},"_enqueue_ts":1638438091.409728,"_queued_total":0}
    2021-12-02T10:41:31+01:00 [16556] [debug] Do we talk to JiraCloud or JiraServer ?
    2021-12-02T10:41:31+01:00 [16556] [debug] GET https://servicedesk.csti.ch/rest/api/2/serverInfo
    2021-12-02T10:41:31+01:00 [16556] [debug] Response: 200
    2021-12-02T10:41:31+01:00 [16556] [info] Instantiate JiraServerClient
    2021-12-02T10:41:31+01:00 [16556] [debug] Set Jira client in debug mode
    2021-12-02T10:41:36+01:00 [16556] [error] Query `GET https://servicedesk.csti.ch/rest/api/2/user?username=JIRAUSER15001` was not successful (code: 404, message: "Not Found"). Jira errors:
    L'utilisateur 'JIRAUSER15001' n'existe pas
    Jira warnings:

    Best regards
    Isabelle
    User avatar

    As far as we were able to test (not much actually), the import should be compatible with JiraServer now. More tests are welcomed !


    • Assigned to changed from Yannis ROSSETTO (rossettoy) to Manuel Vacelet (vaceletm)
    User avatar

    Thank for the traces, it make things easier to debug. A quick feedback before going back to my glass of Valium-Xanax of the morning :)

    With Jira Server, when a user is referenced there is no accountId field in the Json payload. key seems the natural fallback but as far as I can tell from the whole search payload you sent, it's not consistently present when a user is referenced. Maybe self, name or email would be better bets but that lead to the second issue.

    So, we are using accountId to track change on user related data (for instance who was assigned to) so I tried to look at how the changelog was formatted and... /issues/:id/changelog route only exists in Jira Cloud. It seems that the equivalent in Jira Server is to use /issues/KEY?expand=changelog BUT

    • the payload is not documented
    • it seems that it doesn't return the same things depending on the Jira Server versions
    User avatar

    Could you please send me (by chat or by email because it will contain private informations) a tar/zip of the debug directory (if you don't remember its at tuleap config-get tracker_jira_debug_directory) ?

    User avatar

    We've made some progress, at least we passed a good chunk of the import process as we now stops at the export of issues (it means that we were able to extract most of the issueTypes structure). Of course, we face another difference between the API, we will have a look.

    In the mean time, I changed the title of this request to better represent the work on going here.


    • Summary
      -Get list of jira projects doesnt work with Jira Server 
      +Creation of new tracker from Jira doesn't work with Jira Server 
    User avatar
    last edited by: Isabelle Duchet (i.duchet) 2021-11-05 13:52

    Hello,

    I updated our Tuleap instance to 13.1.99.113 and add new tracker from Jira project, got this error in worker_log :

    2021-11-05T12:28:33+01:00 [997] [info] Got message: {"event_name":"tuleap.tracker.creation.jira","payload":{"pending_jira_import_id":3},"_enqueue_ts":16361117
    13.059988,"_queued_total":0}
    2021-11-05T12:28:33+01:00 [1311] [debug] Starting to process message: {"event_name":"tuleap.tracker.creation.jira","payload":{"pending_jira_import_id":3},"_en
    queue_ts":1636111713.059988,"_queued_total":0}
    2021-11-05T12:28:33+01:00 [1311] [debug] Do we talk to JiraCloud or JiraServer ?
    2021-11-05T12:28:33+01:00 [1311] [debug] GET https://servicedesk.csti.ch/rest/api/2/serverInfo
    2021-11-05T12:28:33+01:00 [1311] [debug] Response: 200
    2021-11-05T12:28:33+01:00 [1311] [info] Instantiate JiraServerClient
    2021-11-05T12:28:34+01:00 [997] [error] The command "'tuleap' 'queue:task-worker-process'" failed.
    
    Exit Code: 1(General error)
    
    Working directory: /usr/share/tuleap/src/common/Queue/TaskWorker/../../../../
    
    Output:
    ================
    
    Error Output:
    ================
    
    In JiraUserRetriever.php line 79:
    
      [Tuleap\Tracker\Creation\JiraImporter\Import\User\JiraMinimalUserInformationMissingException]
      `displayName` or `accountId` key are missing in user data returned by the J
      ira REST API.
    
    Exception trace:
      at /usr/share/tuleap/plugins/tracker/include/Tracker/Creation/JiraImporter/Import/User/JiraUserRetriever.php:79
     Tuleap\Tracker\Creation\JiraImporter\Import\User\JiraUserRetriever->retrieveUserFromAPIData() at /usr/share/tuleap/plugins/tracker/include/Tracker/Creation/J
    iraImporter/Import/Artifact/Snapshot/IssueSnapshotCollectionBuilder.php:105
     Tuleap\Tracker\Creation\JiraImporter\Import\Artifact\Snapshot\IssueSnapshotCollectionBuilder->buildCollectionOfSnapshotsForIssue() at /usr/share/tuleap/plugi
    ns/tracker/include/Tracker/Creation/JiraImporter/Import/Artifact/DataChangesetXMLExporter.php:89
     Tuleap\Tracker\Creation\JiraImporter\Import\Artifact\DataChangesetXMLExporter->exportIssueDataInChangesetXML() at /usr/share/tuleap/plugins/tracker/include/T
    racker/Creation/JiraImporter/Import/Artifact/ArtifactsXMLExporter.php:163
     Tuleap\Tracker\Creation\JiraImporter\Import\Artifact\ArtifactsXMLExporter->exportBatchOfIssuesInArtifactXMLFormat() at /usr/share/tuleap/plugins/tracker/incl
    ude/Tracker/Creation/JiraImporter/Import/Artifact/ArtifactsXMLExporter.php:112
     Tuleap\Tracker\Creation\JiraImporter\Import\Artifact\ArtifactsXMLExporter->exportArtifacts() at /usr/share/tuleap/plugins/tracker/include/Tracker/Creation/Ji
    raImporter/Import/JiraXmlExporter.php:365
     Tuleap\Tracker\Creation\JiraImporter\Import\JiraXmlExporter->exportJiraToXml() at /usr/share/tuleap/plugins/tracker/include/Tracker/Creation/JiraImporter/Fro
    mJiraTrackerCreator.php:165
     Tuleap\Tracker\Creation\JiraImporter\FromJiraTrackerCreator->createFromJira() at /usr/share/tuleap/plugins/tracker/include/Tracker/Creation/JiraImporter/Jira
    Runner.php:138
     Tuleap\Tracker\Creation\JiraImporter\JiraRunner->processAsyncJiraImport() at /usr/share/tuleap/plugins/tracker/include/Tracker/Creation/JiraImporter/Asynchro
    nousJiraRunner.php:93
     Tuleap\Tracker\Creation\JiraImporter\AsynchronousJiraRunner->process() at /usr/share/tuleap/plugins/tracker/include/Tracker/Creation/JiraImporter/Asynchronou
    sJiraRunner.php:66
     Tuleap\Tracker\Creation\JiraImporter\AsynchronousJiraRunner::addListener() at /usr/share/tuleap/plugins/tracker/include/trackerPlugin.php:1668
     trackerPlugin->workerEvent() at /usr/share/tuleap/src/common/Event/EventManager.class.php:127
     EventManager->eventManagerDispatch() at /usr/share/tuleap/src/common/Plugin/PluginLoader.php:72
     Tuleap\Plugin\PluginLoader->Tuleap\Plugin\{closure}() at /usr/share/tuleap/src/common/Event/EventManager.class.php:116
     EventManager->processEventOnListener() at /usr/share/tuleap/src/common/Event/EventManager.class.php:146
     EventManager->dispatch() at /usr/share/tuleap/src/common/Queue/TaskWorker/TaskWorkerProcessCommand.php:72
     Tuleap\Queue\TaskWorker\TaskWorkerProcessCommand->execute() at /usr/share/tuleap/src/vendor/symfony/console/Command/Command.php:299
     Symfony\Component\Console\Command\Command->run() at /usr/share/tuleap/src/vendor/symfony/console/Application.php:978
     Symfony\Component\Console\Application->doRunCommand() at /usr/share/tuleap/src/vendor/symfony/console/Application.php:295
     Symfony\Component\Console\Application->doRun() at /usr/share/tuleap/src/common/CLI/Application.php:75
     Tuleap\CLI\Application->doRun() at /usr/share/tuleap/src/vendor/symfony/console/Application.php:167
     Symfony\Component\Console\Application->run() at /usr/share/tuleap/src/utils/tuleap.php:280
    
    queue:task-worker-process [<input_file>]
    User avatar

    @i.duchet could you please upgrade to Tuleap 13.1.99.113 (or higher) and try again (no need to apply any patch, everything is now integrated in mainline)

    User avatar

    @i.duchet I didn't manage to produce a patch that you can apply on a production server, however I made the fix in review (gerrit #24404) so when it's merged you should be able to update your instance and give it a try

    User avatar

    Hello Manuel,

    After applied the patch I got an error HTTP ERROR 500 when I want to add new tracker, and this error in error_log file :

    2021/10/29 15:15:13 [error] 14235#14235: *2 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Interface "Tuleap\Tracker\Creation\JiraImporter\UserRole\UserRolesCheckerInterface" not found in /usr/share/tuleap/plugins/tracker/include/Tracker/Creation/JiraImporter/UserRole/UserRolesChecker.php:29 Stack trace: #0 /usr/share/tuleap/src/vendor/composer/ClassLoader.php(480): include() #1 /usr/share/tuleap/src/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile() #2 /usr/share/tuleap/plugins/tracker/include/Tracker/Creation/JiraImporter/FromJiraTrackerCreator.php(129): Composer\Autoload\ClassLoader->loadClass() #3 /usr/share/tuleap/plugins/tracker/include/trackerPlugin.php(2415): Tuleap\Tracker\Creation\JiraImporter\FromJiraTrackerCreator::build() #4 /usr/share/tuleap/plugins/tracker/include/trackerPlugin.php(2200): trackerPlugin->getJiraRunner() #5 /usr/share/tuleap/src/common/Request/FrontRouter.php(258): trackerPlugin->routeCreateNewTracker() #6 /usr/share/tuleap/src/common/Request/FrontRouter.php(109): Tuleap\Request\FrontRouter->" while reading response header from upstream, client: 10.10.30.245, server: tuleap.datacenter.csti, request: "GET /plugins/tracker/ixm-consulting/new HTTP/2. 0", upstream: "fastcgi://127.0.0.1:9000", host: "tuleap.datacenter.csti", referrer: "https://tuleap.datacenter.csti/plugins/tracker/?group_id=102"
    

    Isabelle

    User avatar

    Manuel, unfortunately I cannot give you access to our Jira platform for confidentiality and security reasons. But I am available for testing. I know that Atlassian supplies "developer" licenses that can be used to deploy non-production installations. Would you be able to deploy a Jira server if it is easier for you ?

    User avatar

    I tried this morning on my JiraCloud instance but it's getting worse because the api v2 available on JiraCloud no longer match what's available in JiraServer (/mypermissions endpoint on JiraCloud now requires a permissions parameter that doesn't exist in JiraServer 😭)

    Please remove the last patch, I'll try something else.

    By any chance, would that be possible to have a test account on your platform to make some tests ?

    User avatar
    last edited by: Isabelle Duchet (i.duchet) 2021-10-26 13:53

    Hello Manuel, After applying the patch, I got this error in worker_log file while trying to import a Jira project :

    2021-10-26T13:42:24+02:00 \[1787\] \[info\] Got message: {"event\_name":"tuleap.tracker.creation.jira","payload":{"pending\_jira\_import\_id":1},"\_enqueue\_ts":1635248544.165658,"\_queued\_total":0} 
    2021-10-26T13:42:24+02:00 \[7724\] \[debug\] Starting to process message: {"event\_name":"tuleap.tracker.creation.jira","payload":{"pending\_jira\_import\_id":1},"\_enqueue\_ts":1635248544.165658,"\_queued\_total":0} 
    2021-10-26T13:42:24+02:00 \[7724\] \[error\] Query was not successful (code: 400, message: "Bad Request"). Jira errors: projectId provided is not valid Jira warnings:
    2021-10-26T13:42:24+02:00 \[1787\] \[info\] Message processed in 0.601 seconds \[0/1000\]
    
    User avatar

    As for the other routes, verification of permission is also V3/Cloud only :'(

    We are going to make another patch, again.

    User avatar
    Sure Manuel ! This is the result :
    {
    "permissions": {
    "VIEW_WORKFLOW_READONLY": {
    "id": "45",
    "key": "VIEW_WORKFLOW_READONLY",
    "name": "Voir le worflow en lecture seule",
    "type": "PROJECT",
    "description": "admin.permissions.descriptions.VIEW_WORKFLOW_READONLY",
    "havePermission": true,
    "deprecatedKey": true
    },
    "CREATE_ISSUES": {
    "id": "11",
    "key": "CREATE_ISSUES",
    "name": "Créer des tickets",
    "type": "PROJECT",
    "description": "Capacité à créer des tickets.",
    "havePermission": true
    },
    "BULK_CHANGE": {
    "id": "33",
    "key": "BULK_CHANGE",
    "name": "Changement en lot",
    "type": "GLOBAL",
    "description": "Capacité à modifier une série de tickets en une fois. Par exemple, traiter plusieurs tickets en une seule étape.",
    "havePermission": true
    },
    "CREATE_ATTACHMENT": {
    "id": "19",
    "key": "CREATE_ATTACHMENT",
    "name": "Créer des pièces jointes",
    "type": "PROJECT",
    "description": "Les utilisateurs bénéficiant de cette autorisation peuvent créer des pièces jointes.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "DELETE_OWN_COMMENTS": {
    "id": "37",
    "key": "DELETE_OWN_COMMENTS",
    "name": "Supprimer ses propres commentaires",
    "type": "PROJECT",
    "description": "Capacité à supprimer ses propres commentaires sur les tickets.",
    "havePermission": true
    },
    "WORK_ON_ISSUES": {
    "id": "20",
    "key": "WORK_ON_ISSUES",
    "name": "Travailler sur des tickets",
    "type": "PROJECT",
    "description": "Capacité à consigner le travail effectué sur un ticket. Utile uniquement si le suivi temporel est activé.",
    "havePermission": true
    },
    "PROJECT_ADMIN": {
    "id": "23",
    "key": "PROJECT_ADMIN",
    "name": "Gérer les projets",
    "type": "PROJECT",
    "description": "Capacité à gérer un projet dans Jira.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "COMMENT_EDIT_ALL": {
    "id": "34",
    "key": "COMMENT_EDIT_ALL",
    "name": "Modifier tous les commentaires",
    "type": "PROJECT",
    "description": "Capacité à modifier tous les commentaires sur les tickets.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "ATTACHMENT_DELETE_OWN": {
    "id": "39",
    "key": "ATTACHMENT_DELETE_OWN",
    "name": "Supprimer ses propres pièces jointes",
    "type": "PROJECT",
    "description": "Les utilisateurs bénéficiant de cette autorisation peuvent supprimer leurs propres pièces jointes.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "WORKLOG_DELETE_OWN": {
    "id": "42",
    "key": "WORKLOG_DELETE_OWN",
    "name": "Supprimer ses propres journaux de travail",
    "type": "PROJECT",
    "description": "Capacité à supprimer ses propres journaux de travail sur les tickets.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "CLOSE_ISSUE": {
    "id": "18",
    "key": "CLOSE_ISSUE",
    "name": "Fermer des tickets",
    "type": "PROJECT",
    "description": "Capacité à fermer des tickets. Souvent utile lors de la résolution de tickets par vos développeurs et de leur fermeture par le service d'assurance qualité.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "MANAGE_WATCHER_LIST": {
    "id": "32",
    "key": "MANAGE_WATCHER_LIST",
    "name": "Gérer les observateurs",
    "type": "PROJECT",
    "description": "Capacité à gérer les observateurs d'un ticket.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "VIEW_VOTERS_AND_WATCHERS": {
    "id": "31",
    "key": "VIEW_VOTERS_AND_WATCHERS",
    "name": "Afficher les votants et les observateurs",
    "type": "PROJECT",
    "description": "Capacité à afficher les votants et les observateurs d'un ticket.",
    "havePermission": true
    },
    "ADD_COMMENTS": {
    "id": "15",
    "key": "ADD_COMMENTS",
    "name": "Ajouter des commentaires",
    "type": "PROJECT",
    "description": "Capacité à commenter des tickets.",
    "havePermission": true
    },
    "GLOBAL_TEMPO_RATE_ADMINISTRATOR": {
    "id": "-1",
    "key": "GLOBAL_TEMPO_RATE_ADMINISTRATOR",
    "name": "Administrateurs des tarifs Tempo",
    "type": "GLOBAL",
    "description": "Pour les feuilles de temps Tempo: Possibilité de fixer le tarif des rôles d'équipe dans des équipes différentes.",
    "havePermission": true
    },
    "COMMENT_DELETE_ALL": {
    "id": "36",
    "key": "COMMENT_DELETE_ALL",
    "name": "Supprimer tous les commentaires",
    "type": "PROJECT",
    "description": "Capacité à supprimer tous les commentaires sur les tickets.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "CREATE_ISSUE": {
    "id": "11",
    "key": "CREATE_ISSUE",
    "name": "Créer des tickets",
    "type": "PROJECT",
    "description": "Capacité à créer des tickets.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "DELETE_OWN_ATTACHMENTS": {
    "id": "39",
    "key": "DELETE_OWN_ATTACHMENTS",
    "name": "Supprimer ses propres pièces jointes",
    "type": "PROJECT",
    "description": "Les utilisateurs bénéficiant de cette autorisation peuvent supprimer leurs propres pièces jointes.",
    "havePermission": true
    },
    "DELETE_ALL_ATTACHMENTS": {
    "id": "38",
    "key": "DELETE_ALL_ATTACHMENTS",
    "name": "Supprimer toutes les pièces jointes",
    "type": "PROJECT",
    "description": "Les utilisateurs bénéficiant de cette autorisation peuvent supprimer toutes les pièces jointes.",
    "havePermission": true
    },
    "ASSIGN_ISSUE": {
    "id": "13",
    "key": "ASSIGN_ISSUE",
    "name": "Attribuer des tickets",
    "type": "PROJECT",
    "description": "Capacité à assigner des tickets à d'autres personnes.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "LINK_ISSUE": {
    "id": "21",
    "key": "LINK_ISSUE",
    "name": "Lier des tickets",
    "type": "PROJECT",
    "description": "Capacité à lier ensemble des tickets et à créer des tickets liées. Utile uniquement si le suivi temporel est activé.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "EDIT_OWN_WORKLOGS": {
    "id": "40",
    "key": "EDIT_OWN_WORKLOGS",
    "name": "Modifier ses propres journaux de travail",
    "type": "PROJECT",
    "description": "Capacité à modifier ses propres journaux de travail sur les tickets.",
    "havePermission": true
    },
    "PROJECT_VIEW_ALL_WORKLOGS": {
    "id": "-1",
    "key": "PROJECT_VIEW_ALL_WORKLOGS",
    "name": "Voir tous les journaux de travail",
    "type": "PROJECT",
    "description": "Possibilité de voir tous les journaux de travail pour le projet dans Feuilles de temps Tempo",
    "havePermission": true
    },
    "TEMPO_TIMESHEETS_ACCESS": {
    "id": "-1",
    "key": "TEMPO_TIMESHEETS_ACCESS",
    "name": "Accès aux feuilles de temps Tempo",
    "type": "GLOBAL",
    "description": "Accordez ou refusez laccès aux feuilles de temps Tempo à des groupes précis dans votre organisation ou à des utilisateurs Jira externes ayant la permission dafficher vos demandes Jira. Tous les utilisateurs de votre organisation y ont accès par défaut.",
    "havePermission": true
    },
    "CREATE_ATTACHMENTS": {
    "id": "19",
    "key": "CREATE_ATTACHMENTS",
    "name": "Créer des pièces jointes",
    "type": "PROJECT",
    "description": "Les utilisateurs bénéficiant de cette autorisation peuvent créer des pièces jointes.",
    "havePermission": true
    },
    "EDIT_ALL_WORKLOGS": {
    "id": "41",
    "key": "EDIT_ALL_WORKLOGS",
    "name": "Modifier tous les journaux de travail",
    "type": "PROJECT",
    "description": "Capacité à modifier tous les commentaires journaux de travail sur les tickets.",
    "havePermission": true
    },
    "SCHEDULE_ISSUE": {
    "id": "28",
    "key": "SCHEDULE_ISSUE",
    "name": "Planifier des tickets",
    "type": "PROJECT",
    "description": "Capacité à afficher ou modifier la date d'échéance d'un ticket.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "CLOSE_ISSUES": {
    "id": "18",
    "key": "CLOSE_ISSUES",
    "name": "Fermer des tickets",
    "type": "PROJECT",
    "description": "Capacité à fermer des tickets. Souvent utile lors de la résolution de tickets par vos développeurs et de leur fermeture par le service d'assurance qualité.",
    "havePermission": true
    },
    "SET_ISSUE_SECURITY": {
    "id": "26",
    "key": "SET_ISSUE_SECURITY",
    "name": "Configurer la sécurité du ticket",
    "type": "PROJECT",
    "description": "Capacité à configurer le niveau de sécurité d'un ticket afin que les seules personnes de ce niveau de sécurité puissent voir le ticket.",
    "havePermission": true
    },
    "SCHEDULE_ISSUES": {
    "id": "28",
    "key": "SCHEDULE_ISSUES",
    "name": "Planifier des tickets",
    "type": "PROJECT",
    "description": "Capacité à afficher ou modifier la date d'échéance d'un ticket.",
    "havePermission": true
    },
    "WORKLOG_DELETE_ALL": {
    "id": "43",
    "key": "WORKLOG_DELETE_ALL",
    "name": "Supprimer tous les journaux de travail",
    "type": "PROJECT",
    "description": "Capacité à supprimer tous les commentaires journaux de travail sur les tickets.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "COMMENT_DELETE_OWN": {
    "id": "37",
    "key": "COMMENT_DELETE_OWN",
    "name": "Supprimer ses propres commentaires",
    "type": "PROJECT",
    "description": "Capacité à supprimer ses propres commentaires sur les tickets.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "ADMINISTER_PROJECTS": {
    "id": "23",
    "key": "ADMINISTER_PROJECTS",
    "name": "Gérer les projets",
    "type": "PROJECT",
    "description": "Capacité à gérer un projet dans Jira.",
    "havePermission": true
    },
    "DELETE_ALL_COMMENTS": {
    "id": "36",
    "key": "DELETE_ALL_COMMENTS",
    "name": "Supprimer tous les commentaires",
    "type": "PROJECT",
    "description": "Capacité à supprimer tous les commentaires sur les tickets.",
    "havePermission": true
    },
    "RESOLVE_ISSUES": {
    "id": "14",
    "key": "RESOLVE_ISSUES",
    "name": "Traiter les tickets",
    "type": "PROJECT",
    "description": "Capacité à traiter et rouvrir des tickets. Ceci inclut la capacité de configurer une version corrigée.",
    "havePermission": true
    },
    "VIEW_READONLY_WORKFLOW": {
    "id": "45",
    "key": "VIEW_READONLY_WORKFLOW",
    "name": "Voir le worflow en lecture seule",
    "type": "PROJECT",
    "description": "Les utilisateurs bénéficiant de cette autorisation peuvent afficher une version en lecture seule d'un workflow.",
    "havePermission": true
    },
    "ADMINISTER": {
    "id": "0",
    "key": "ADMINISTER",
    "name": "Administrateurs Jira",
    "type": "GLOBAL",
    "description": "Capacité d'effectuer la plupart des fonctions administratives (à l'exception d'Importer et exporter, configuration SMTP, etc.).",
    "havePermission": true
    },
    "GLOBAL_BROWSE_ARCHIVE": {
    "id": "-1",
    "key": "GLOBAL_BROWSE_ARCHIVE",
    "name": "Parcourir les archives",
    "type": "GLOBAL",
    "description": "Capacité à parcourir tous les tickets archivés.",
    "havePermission": false
    },
    "MOVE_ISSUES": {
    "id": "25",
    "key": "MOVE_ISSUES",
    "name": "Déplacer des tickets",
    "type": "PROJECT",
    "description": "Capacité à déplacer les tickets entre les projets ou entre les workflows du même projet (le cas échéant). Notez que l'utilisateur ne peut déplacer des tickets que vers un projet qu'il a eu l'autorisation de créer.",
    "havePermission": true
    },
    "TRANSITION_ISSUES": {
    "id": "46",
    "key": "TRANSITION_ISSUES",
    "name": "Transitionner les tickets",
    "type": "PROJECT",
    "description": "Capacité à transitionner les tickets.",
    "havePermission": true
    },
    "PROJECT_LOG_WORK_FOR_OTHERS": {
    "id": "-1",
    "key": "PROJECT_LOG_WORK_FOR_OTHERS",
    "name": "Inscrire du temps de travail pour les autres",
    "type": "PROJECT",
    "description": "Possibilité de créer des journaux de travail pour le projet dans Feuilles de temps Tempo pour d'autres utilisateurs. Utile uniquement si le suivi du temps est activé.",
    "havePermission": false
    },
    "SYSTEM_ADMIN": {
    "id": "44",
    "key": "SYSTEM_ADMIN",
    "name": "Administrateurs de système Jira",
    "type": "GLOBAL",
    "description": "Capacité d'effectuer toutes les fonctions administratives. Il doit y avoir au moins un groupe avec cette autorisation.",
    "havePermission": true
    },
    "DELETE_OWN_WORKLOGS": {
    "id": "42",
    "key": "DELETE_OWN_WORKLOGS",
    "name": "Supprimer ses propres journaux de travail",
    "type": "PROJECT",
    "description": "Capacité à supprimer ses propres journaux de travail sur les tickets.",
    "havePermission": true
    },
    "BROWSE": {
    "id": "10",
    "key": "BROWSE",
    "name": "Parcourir les projets",
    "type": "PROJECT",
    "description": "Capacité à parcourir des projets et les tickets qu'ils comportent.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "EDIT_ISSUE": {
    "id": "12",
    "key": "EDIT_ISSUE",
    "name": "Modifier des tickets",
    "type": "PROJECT",
    "description": "Capacité à modifier des tickets.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "MODIFY_REPORTER": {
    "id": "30",
    "key": "MODIFY_REPORTER",
    "name": "Modifier le rapporteur",
    "type": "PROJECT",
    "description": "Capacité à modifier le rapporteur lors de la création ou de la modification d'un ticket.",
    "havePermission": true
    },
    "GLOBAL_TEMPO_ACCOUNT_ADMINISTRATOR": {
    "id": "-1",
    "key": "GLOBAL_TEMPO_ACCOUNT_ADMINISTRATOR",
    "name": "Administrateurs des comptes Tempo",
    "type": "GLOBAL",
    "description": "Possibilité de créer, configurer et supprimer des comptes. Certaines configurations de compte requièrent des autorisations dadministrateur JIRA.",
    "havePermission": true
    },
    "EDIT_ISSUES": {
    "id": "12",
    "key": "EDIT_ISSUES",
    "name": "Modifier des tickets",
    "type": "PROJECT",
    "description": "Capacité à modifier des tickets.",
    "havePermission": true
    },
    "MANAGE_WATCHERS": {
    "id": "32",
    "key": "MANAGE_WATCHERS",
    "name": "Gérer les observateurs",
    "type": "PROJECT",
    "description": "Capacité à gérer les observateurs d'un ticket.",
    "havePermission": true
    },
    "EDIT_OWN_COMMENTS": {
    "id": "35",
    "key": "EDIT_OWN_COMMENTS",
    "name": "Modifier ses propres commentaires",
    "type": "PROJECT",
    "description": "Capacité à modifier ses propres commentaires sur les tickets.",
    "havePermission": true
    },
    "ASSIGN_ISSUES": {
    "id": "13",
    "key": "ASSIGN_ISSUES",
    "name": "Attribuer des tickets",
    "type": "PROJECT",
    "description": "Capacité à assigner des tickets à d'autres personnes.",
    "havePermission": true
    },
    "BROWSE_PROJECTS": {
    "id": "10",
    "key": "BROWSE_PROJECTS",
    "name": "Parcourir les projets",
    "type": "PROJECT",
    "description": "Capacité à parcourir des projets et les tickets qu'ils comportent.",
    "havePermission": true
    },
    "GLOBAL_TEMPO_ADMINISTRATOR": {
    "id": "-1",
    "key": "GLOBAL_TEMPO_ADMINISTRATOR",
    "name": "Administrateurs Tempo",
    "type": "GLOBAL",
    "description": "Pour Feuilles de temps Tempo: capacité à gérer les demandes internes, ouvrir et fermer les périodes de travail, configurer la semaine de travail et spécifier les jours fériés.",
    "havePermission": true
    },
    "VIEW_VERSION_CONTROL": {
    "id": "29",
    "key": "VIEW_VERSION_CONTROL",
    "name": "Afficher les outils de développement",
    "type": "PROJECT",
    "description": "Permet aux utilisateurs d'afficher les informations relatives au développement sur l'écran Afficher le ticket, notamment les informations en lien avec les validations, les revues et les builds.",
    "havePermission": false,
    "deprecatedKey": true
    },
    "WORK_ISSUE": {
    "id": "20",
    "key": "WORK_ISSUE",
    "name": "Travailler sur des tickets",
    "type": "PROJECT",
    "description": "Capacité à consigner le travail effectué sur un ticket. Utile uniquement si le suivi temporel est activé.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "COMMENT_ISSUE": {
    "id": "15",
    "key": "COMMENT_ISSUE",
    "name": "Ajouter des commentaires",
    "type": "PROJECT",
    "description": "Capacité à commenter des tickets.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "WORKLOG_EDIT_ALL": {
    "id": "41",
    "key": "WORKLOG_EDIT_ALL",
    "name": "Modifier tous les journaux de travail",
    "type": "PROJECT",
    "description": "Capacité à modifier tous les commentaires journaux de travail sur les tickets.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "EDIT_ALL_COMMENTS": {
    "id": "34",
    "key": "EDIT_ALL_COMMENTS",
    "name": "Modifier tous les commentaires",
    "type": "PROJECT",
    "description": "Capacité à modifier tous les commentaires sur les tickets.",
    "havePermission": true
    },
    "DELETE_ISSUE": {
    "id": "16",
    "key": "DELETE_ISSUE",
    "name": "Supprimer des tickets",
    "type": "PROJECT",
    "description": "Capacité à supprimer des tickets.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "USER_PICKER": {
    "id": "27",
    "key": "USER_PICKER",
    "name": "Parcourir les utilisateurs",
    "type": "GLOBAL",
    "description": "Capacité à sélectionner un utilisateur ou un groupe dans une fenêtre contextuelle et capacité à utiliser la fonctionnalité de partage des tickets. Les utilisateurs bénéficiant de cette autorisation pourront également voir les noms de tous les utilisateurs et groupes du système.",
    "havePermission": true
    },
    "CREATE_SHARED_OBJECTS": {
    "id": "22",
    "key": "CREATE_SHARED_OBJECTS",
    "name": "Créer des objets partagés",
    "type": "GLOBAL",
    "description": "Capacité à partager des tableaux de bord et des filtres avec d'autres utilisateurs, groupes et rôles.",
    "havePermission": true
    },
    "ATTACHMENT_DELETE_ALL": {
    "id": "38",
    "key": "ATTACHMENT_DELETE_ALL",
    "name": "Supprimer toutes les pièces jointes",
    "type": "PROJECT",
    "description": "Les utilisateurs bénéficiant de cette autorisation peuvent supprimer toutes les pièces jointes.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "DELETE_ISSUES": {
    "id": "16",
    "key": "DELETE_ISSUES",
    "name": "Supprimer des tickets",
    "type": "PROJECT",
    "description": "Capacité à supprimer des tickets.",
    "havePermission": true
    },
    "MANAGE_GROUP_FILTER_SUBSCRIPTIONS": {
    "id": "24",
    "key": "MANAGE_GROUP_FILTER_SUBSCRIPTIONS",
    "name": "Gérer les abonnements aux filtres de groupe",
    "type": "GLOBAL",
    "description": "Capacité à gérer (créer et supprimer) les abonnements aux filtres de groupe.",
    "havePermission": true
    },
    "RESOLVE_ISSUE": {
    "id": "14",
    "key": "RESOLVE_ISSUE",
    "name": "Traiter les tickets",
    "type": "PROJECT",
    "description": "Capacité à traiter et rouvrir des tickets. Ceci inclut la capacité de configurer une version corrigée.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "SERVICEDESK_AGENT": {
    "id": "-1",
    "key": "SERVICEDESK_AGENT",
    "name": "Agent de service d'assistance",
    "type": "PROJECT",
    "description": "Permet aux utilisateurs d'interagir avec les clients et d'accéder aux fonctionnalités Jira Service Management d'un projet.",
    "havePermission": true
    },
    "ASSIGNABLE_USER": {
    "id": "17",
    "key": "ASSIGNABLE_USER",
    "name": "Utilisateur pouvant être attribué",
    "type": "PROJECT",
    "description": "Les utilisateurs bénéficiant de cette autorisation peuvent se voir assigner des tickets.",
    "havePermission": true
    },
    "TRANSITION_ISSUE": {
    "id": "46",
    "key": "TRANSITION_ISSUE",
    "name": "Transitionner les tickets",
    "type": "PROJECT",
    "description": "Capacité à transitionner les tickets.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "COMMENT_EDIT_OWN": {
    "id": "35",
    "key": "COMMENT_EDIT_OWN",
    "name": "Modifier ses propres commentaires",
    "type": "PROJECT",
    "description": "Capacité à modifier ses propres commentaires sur les tickets.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "GLOBAL_TEMPO_TEAM_ADMINISTRATOR": {
    "id": "-1",
    "key": "GLOBAL_TEMPO_TEAM_ADMINISTRATOR",
    "name": "Administrateurs des équipes Tempo",
    "type": "GLOBAL",
    "description": "Possibilité de créer, configurer, parcourir et supprimer des équipes, ainsi que gérer les autorisations des équipes. <br/>Aussi, pour Tempo Planner: possibilité de créer, configurer et supprimer des programmes (groupes et équipes), d'itérer des programmes et de planifier du temps pour les équipes et leurs membres.",
    "havePermission": true
    },
    "MOVE_ISSUE": {
    "id": "25",
    "key": "MOVE_ISSUE",
    "name": "Déplacer des tickets",
    "type": "PROJECT",
    "description": "Capacité à déplacer les tickets entre les projets ou entre les workflows du même projet (le cas échéant). Notez que l'utilisateur ne peut déplacer des tickets que vers un projet qu'il a eu l'autorisation de créer.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "WORKLOG_EDIT_OWN": {
    "id": "40",
    "key": "WORKLOG_EDIT_OWN",
    "name": "Modifier ses propres journaux de travail",
    "type": "PROJECT",
    "description": "Capacité à modifier ses propres journaux de travail sur les tickets.",
    "havePermission": true,
    "deprecatedKey": true
    },
    "DELETE_ALL_WORKLOGS": {
    "id": "43",
    "key": "DELETE_ALL_WORKLOGS",
    "name": "Supprimer tous les journaux de travail",
    "type": "PROJECT",
    "description": "Capacité à supprimer tous les commentaires journaux de travail sur les tickets.",
    "havePermission": true
    },
    "LINK_ISSUES": {
    "id": "21",
    "key": "LINK_ISSUES",
    "name": "Lier des tickets",
    "type": "PROJECT",
    "description": "Capacité à lier ensemble des tickets et à créer des tickets liées. Utile uniquement si le suivi temporel est activé.",
    "havePermission": true
    }
    }
    }
    User avatar

    Would that be possible to share (privately if it contains sensitive informations) the result of the REST call to /rest/api/2/mypermissions?projectKey=PSI endpoint ?

    User avatar
    last edited by: Manuel Vacelet (vaceletm) 2021-10-25 16:17

    Hello , Sorry for the late reply.. I am able to connect Jira from tuleap with Jira personal token. I have access to Jira projects now. But when I try to create a new tracker, nothing happening.

    I found this error in worker_log :

    2021-10-25T15:18:08+02:00 [7528] [info] Got message: {"event_name":"tuleap.tracker.creation.jira","payload":{"pending_jira_import_id":1},"_enqueue_ts":1635167888.318826,"_queued_total":0}
    2021-10-25T15:18:08+02:00 [27534] [debug] Starting to process message: {"event_name":"tuleap.tracker.creation.jira","payload":{"pending_jira_import_id":1},"_enqueue_ts":1635167888.318826,"_queued_total":0}
    2021-10-25T15:18:08+02:00 [27534] [error] Query was not successful (code: 404, message: "Not Found"). Error response cannot be read, invalid json for https://servicedesk.csti.ch/rest/api/2/project/PSI/roledetails?currentMember=true
    2021-10-25T15:18:08+02:00 [7528] [info] Message processed in 0.669 seconds [0/1000]
    

    This url failed in the browser :

    This XML file does not appear to have any style information associated with it. The document tree is shown below.

    <status>
    <status-code>404</status-code>
    <message>null for uri: https://servicedesk.csti.ch/rest/api/2/project/PSI/roledetails?currentMember=true</message>
    </status>
    

    this url https://servicedesk.csti.ch/rest/api/2/project/PSI/ return this json :

    {
      "expand": "description,lead,url,projectKeys",
      "self": "https://servicedesk.csti.ch/rest/api/2/project/12000",
      "id": "12000",
      "key": "PSI",
      "description": "",
      "lead": {
        "self": "https://servicedesk.csti.ch/rest/api/2/user?username=e.fazenda@csti.ch",
        "key": "e.fazenda@csti.ch",
        "name": "e.fazenda@csti.ch",
        "avatarUrls": {
          "48x48": "https://servicedesk.csti.ch/secure/useravatar?avatarId=10346",
          "24x24": "https://servicedesk.csti.ch/secure/useravatar?size=small&avatarId=10346",
          "16x16": "https://servicedesk.csti.ch/secure/useravatar?size=xsmall&avatarId=10346",
          "32x32": "https://servicedesk.csti.ch/secure/useravatar?size=medium&avatarId=10346"
        },
        "displayName": "Edouard FAZENDA",
        "active": true
      },
      "components": [],
      "issueTypes": [
        {
          "self": "https://servicedesk.csti.ch/rest/api/2/issuetype/10105",
          "id": "10105",
          "description": "",
          "iconUrl": "https://servicedesk.csti.ch/secure/viewavatar?size=xsmall&avatarId=10607&avatarType=issuetype",
          "name": "Tâche",
          "subtask": false,
          "avatarId": 10607
        },
        {
          "self": "https://servicedesk.csti.ch/rest/api/2/issuetype/10106",
          "id": "10106",
          "description": "",
          "iconUrl": "https://servicedesk.csti.ch/secure/viewavatar?size=xsmall&avatarId=10608&avatarType=issuetype",
          "name": "Sous-tâche",
          "subtask": true,
          "avatarId": 10608
        }
      ],
      "assigneeType": "UNASSIGNED",
      "versions": [],
      "name": "PVOil SIngapore Infrastructure",
      "roles": {
        "Service Desk Team": "https://servicedesk.csti.ch/rest/api/2/project/12000/role/10101",
        "Service Desk Customers": "https://servicedesk.csti.ch/rest/api/2/project/12000/role/10100",
        "Administrators": "https://servicedesk.csti.ch/rest/api/2/project/12000/role/10002",
        "Tempo Project Managers": "https://servicedesk.csti.ch/rest/api/2/project/12000/role/10200"
      },
      "avatarUrls": {
        "48x48": "https://servicedesk.csti.ch/secure/projectavatar?avatarId=10324",
        "24x24": "https://servicedesk.csti.ch/secure/projectavatar?size=small&avatarId=10324",
        "16x16": "https://servicedesk.csti.ch/secure/projectavatar?size=xsmall&avatarId=10324",
        "32x32": "https://servicedesk.csti.ch/secure/projectavatar?size=medium&avatarId=10324"
      },
      "projectCategory": {
        "self": "https://servicedesk.csti.ch/rest/api/2/projectCategory/10400",
        "id": "10400",
        "name": "Project",
        "description": ""
      },
      "projectTypeKey": "business",
      "archived": false
    }
    

    Best regards, Isabelle

    EDIT @vaceletm: make the technical part readable

    User avatar
    Hello Yannis,
    Sorry I was on vacations.
    I updated tuleap and applied Manuel's patch v3 successfully.
    I'm able to parse all Jira's projects now.
    I'm going to make some tests and back to you asap.
    Thanks
    Isabelle
    User avatar

    Hello,

    Tuleap 12.11.99.135 must be available. Let me known if the patch provided by @vaceletm is no more compatible so that I can provide you a patch that is compatible with this new version.


    • Status changed from Under implementation to Waiting for information
    User avatar

    Thanks for your answer.

    To avoid to have too many patches applied, is it possible on your side to :

    • Upgrade your Tuleap to the 12.11.99.133 version
    • Apply the patch @vaceletm provides you (0001-request-22580-Get-list-of-jira-projects-doesnt-work-v3.patch)
    • Then retry the import and provide us the content of /var/tmp/jira_debug

    All the previous patches I provided to you are integrated into the 12.11.99.133 Tuleap version, and the PAT handling is also part of this release.

    User avatar

    Hello Yannis, Great news ! We are running Tuleap Community Edition Dev Build 12.11.99.61 Regards, Isabelle

    User avatar

    Hello,

    For your information, a new request has been approved to deal with both API and Personal tokens (please see request #22612). I will check to provide you a patch.

    Can you tell which version of Tuleap are you currently running?

    User avatar

    Hello Yannis, Thanks for your reply I guess you choose the authentication with an API token for security reasons ? It is just not possible to use user/password ? Isabelle

    Yes, If for instance you leak your token somewhere, it's easier to revoke it and generate a new one than dealing with password. In addition, if you enable the two factor authentication, you cannot use your password directly to use the API. Only the token will work. Finally, when you create a token, you can limit what the token is allowed to do/see, while passwords give full access on what the user is able to do/see.

    We only have a Jira Cloud instance to do our tests and developments, that's why the PATs were not taken into account. Thanks to your tests, we will be able to add them in our Jira import process.

    User avatar

    Hello Yannis, Thanks for your reply I guess you choose the authentication with an API token for security reasons ? It is just not possible to use user/password ? Isabelle

    User avatar

    OK thanks for the link of PAT documentation. Given what I read, I don't think that our integration is compatible with PATs (only with API token for now). I will check what we can do.

    In any case, many thanks for the tests you do and the feedback you provide to us.


    • Status changed from Waiting for information to Under implementation
    User avatar

    Hello Yannis, Manuel,

    After 4 failed connections, a captcha is required to the next connexion.

    I reset the failed counter and now I have a 401 error, I added the new log file in attachments.

    API token is not a feature available in Jira Server, but in Jira Cloud. Additional plugins exist but I do not know if they are compatibles with your integration like https://marketplace.atlassian.com/apps/1221182/api-tokens-for-jira?hosting=server&tab=overview 

    I use a personal Access Token : https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html

    Isabelle


    User avatar

    Thanks.

    @vaceletm was right, there is an issue with captcha : X-Authentication-Denied-Reason: CAPTCHA_CHALLENGE;

    Are you using your password or an API token?

    User avatar

    You can find a second log patch in attachments (the file is named jira_headers_errors.patch).

    Please apply this patch on top of the previous patch (v3) provided by @vaceletm and the last patch proved by me, and then provide us the content of /var/tmp/jira_debug (you can remove its old content before running a new import)


    User avatar

    Hello,

    Thanks for your test. I will check that.


    • Status changed from Waiting for information to Under implementation
    User avatar

    Hello Yannis , Manuel, I attached the log files (584601cada34db902fec9868640c109d840d8b64) created after applying patch and running a new import. I don't see more informations in this log. I restarted nginx and tuleap after applying the patch. Did I miss something ? Regards, Isabelle


    User avatar

    You can find the log patch in attachments (the file is named jira_headers.patch).

    Please apply this patch on top of the previous patch (v3) provided by @vaceletm, and then provide us the content of /var/tmp/jira_debug (you can remove its old content before running a new import)


    User avatar

    Hello,

    For your information, the patch that adds the headers in the debug files has been submitted for review: request #22590. I will do a patch once it has been approved.

    User avatar

    Hello,

    I will do the patch that adds headers on the debug tool Monday.


    • Status changed from Under review to Under implementation
    • Assigned to changed from Manuel Vacelet (vaceletm) to Yannis ROSSETTO (rossettoy)
    User avatar

    I suspect there is something wrong with the credentials you are using when you are using the tuleap web UI

    As your server is public and /rest/api/2/serverInfo I tried to access it with curl https://servicedesk.csti.ch/rest/api/2/serverInfo => the payload is returned However if I use dummy credentials like curl -u foo:bar https://servicedesk.csti.ch/rest/api/2/serverInfo I get an error: HTTP/1.1 401

    I made a 3rd version of the path that can gather all the exchanges between Tuleap and Jira. You will need to remove the patch v2 before applying the v3. Then you should create a directory to gather logs:

    install -d -o codendiadm -g codendiadm -m 750 /var/tmp/jira_debug
    tuleap config-set tracker_jira_debug_directory /var/tmp/jira_debug
    

    Try again from Tuleap web UI and send me back the content of /var/tmp/jira_debug


    User avatar
    From my laptop :

    * Trying XXX.XXX.XXX.XXX...
    * TCP_NODELAY set
    * Connected to servicedesk.csti.ch (XXX.XXX.XXX.XXX) port 443 (#0)
    * schannel: SSL/TLS connection with servicedesk.csti.ch port 443 (step 1/3)
    * schannel: checking server certificate revocation
    * schannel: sending initial handshake data: sending 190 bytes...
    * schannel: sent initial handshake data: sent 190 bytes
    * schannel: SSL/TLS connection with servicedesk.csti.ch port 443 (step 2/3)
    * schannel: failed to receive handshake, need more data
    * schannel: SSL/TLS connection with servicedesk.csti.ch port 443 (step 2/3)
    * schannel: encrypted data got 4096
    * schannel: encrypted data buffer: offset 4096 length 4096
    * schannel: encrypted data length: 4022
    * schannel: encrypted data buffer: offset 4022 length 4096
    * schannel: received incomplete message, need more data
    * schannel: SSL/TLS connection with servicedesk.csti.ch port 443 (step 2/3)
    * schannel: encrypted data got 1024
    * schannel: encrypted data buffer: offset 5046 length 5046
    * schannel: received incomplete message, need more data
    * schannel: SSL/TLS connection with servicedesk.csti.ch port 443 (step 2/3)
    * schannel: encrypted data got 1024
    * schannel: encrypted data buffer: offset 6070 length 6070
    * schannel: received incomplete message, need more data
    * schannel: SSL/TLS connection with servicedesk.csti.ch port 443 (step 2/3)
    * schannel: encrypted data got 1024
    * schannel: encrypted data buffer: offset 7094 length 7094
    * schannel: received incomplete message, need more data
    * schannel: SSL/TLS connection with servicedesk.csti.ch port 443 (step 2/3)
    * schannel: encrypted data got 469
    * schannel: encrypted data buffer: offset 7563 length 8118
    * schannel: sending next handshake data: sending 93 bytes...
    * schannel: SSL/TLS connection with servicedesk.csti.ch port 443 (step 2/3)
    * schannel: encrypted data got 290
    * schannel: encrypted data buffer: offset 290 length 8118
    * schannel: SSL/TLS handshake complete
    * schannel: SSL/TLS connection with servicedesk.csti.ch port 443 (step 3/3)
    * schannel: stored credential handle in session cache
    * Server auth using Basic with user 'i.duchet@csti.ch'
    > GET //rest/api/2/project HTTP/1.1
    > Host: servicedesk.csti.ch
    > Authorization: Basic aS5kdWNoZXRAY3N0aS5jaDpFbWUhUmFjQEFsZTIx
    > User-Agent: curl/7.55.1
    > Accept: */*
    >
    * schannel: client wants to read 102400 bytes
    * schannel: encdata_buffer resized 103424
    * schannel: encrypted data buffer: offset 0 length 103424
    * schannel: encrypted data got 12107
    * schannel: encrypted data buffer: offset 12107 length 103424
    * schannel: decrypted data length: 760
    * schannel: decrypted data added: 760
    * schannel: decrypted data cached: offset 760 length 102400
    * schannel: encrypted data length: 11318
    * schannel: encrypted data cached: offset 11318 length 103424
    * schannel: decrypted data length: 7224
    * schannel: decrypted data added: 7224
    * schannel: decrypted data cached: offset 7984 length 102400
    * schannel: encrypted data length: 4065
    * schannel: encrypted data cached: offset 4065 length 103424
    * schannel: decrypted data length: 968
    * schannel: decrypted data added: 968
    * schannel: decrypted data cached: offset 8952 length 102400
    * schannel: encrypted data length: 3068
    * schannel: encrypted data cached: offset 3068 length 103424
    * schannel: decrypted data length: 2
    * schannel: decrypted data added: 2
    * schannel: decrypted data cached: offset 8954 length 102400
    * schannel: encrypted data length: 3037
    * schannel: encrypted data cached: offset 3037 length 103424
    * schannel: decrypted data length: 6
    * schannel: decrypted data added: 6
    * schannel: decrypted data cached: offset 8960 length 102400
    * schannel: encrypted data length: 3002
    * schannel: encrypted data cached: offset 3002 length 103424
    * schannel: failed to decrypt data, need more data
    * schannel: schannel_recv cleanup
    * schannel: decrypted data returned 8960
    * schannel: decrypted data buffer: offset 0 length 102400
    < HTTP/1.1 200
    < Date: Thu, 29 Jul 2021 11:39:01 GMT
    < Server: Apache/2.4.29 (Ubuntu)
    < X-AREQUESTID: 819x22733x1
    < Referrer-Policy: strict-origin-when-cross-origin
    < X-XSS-Protection: 1; mode=block
    < X-Content-Type-Options: nosniff
    < X-Frame-Options: SAMEORIGIN
    < Content-Security-Policy: frame-ancestors 'self'
    < Strict-Transport-Security: max-age=31536000
    < X-Seraph-LoginReason: OK
    < X-ASESSIONID: qjv8gl
    < X-AUSERNAME: i.duchet%40csti.ch
    < Cache-Control: no-cache, no-store, no-transform
    < Content-Type: application/json;charset=UTF-8
    < Set-Cookie: JSESSIONID=FB9FB755B99E6C621FE1DF0235F1DA9B; Path=/; Secure; HttpOnly
    < Set-Cookie: atlassian.xsrf.token=BR5B-I7J5-TNWR-RIS4_d8aa6c3cd134fea80f2f62a5cd713790f0f639e5_lin; Path=/; Secure
    < Transfer-Encoding: chunked
    User avatar
    From tuleap server :

    * About to connect() to servicedesk.csti.ch port 443 (#0)
    * Trying XXX.XXX.XXX.XXX...
    * Connected to servicedesk.csti.ch (XXX.XXX.XXX.XXX) port 443 (#0)
    * Initializing NSS with certpath: sql:/etc/pki/nssdb
    * CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
    * SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
    * Server certificate:
    * subject: CN=*.csti.ch
    * start date: Mar 04 08:53:20 2020 GMT
    * expire date: Mar 04 08:53:20 2022 GMT
    * common name: *.csti.ch
    * issuer: CN=SwissSign Server Silver CA 2014 - G22,O=SwissSign AG,C=CH
    * Server auth using Basic with user 'i.duchet@csti.ch'
    > GET //rest/api/2/project HTTP/1.1
    > Authorization: Basic aS5kdWNoZXRAY3N0aS5jaDpFbWUhUmFjQEFsZTIx
    > User-Agent: curl/7.29.0
    > Host: servicedesk.csti.ch
    > Accept: */*
    >
    < HTTP/1.1 200
    < Date: Thu, 29 Jul 2021 11:40:30 GMT
    < Server: Apache/2.4.29 (Ubuntu)
    < X-AREQUESTID: 820x22745x1
    < Referrer-Policy: strict-origin-when-cross-origin
    < X-XSS-Protection: 1; mode=block
    < X-Content-Type-Options: nosniff
    < X-Frame-Options: SAMEORIGIN
    < Content-Security-Policy: frame-ancestors 'self'
    < Strict-Transport-Security: max-age=31536000
    < X-Seraph-LoginReason: OK
    < X-ASESSIONID: 1gdfkqt
    < X-AUSERNAME: i.duchet%40csti.ch
    < Cache-Control: no-cache, no-store, no-transform
    < Content-Type: application/json;charset=UTF-8
    < Set-Cookie: JSESSIONID=7C88559EE35618D85A989F1DFEF36C21; Path=/; Secure; HttpOnly
    < Set-Cookie: atlassian.xsrf.token=BR5B-I7J5-TNWR-RIS4_87f836e86ece01b286166f5eb78e51fc35105aa5_lin; Path=/; Secure
    < Transfer-Encoding: chunked
    User avatar
    Both work (from my laptop and from tuleap server) and return the same result

    I just have to put my password with quote on tuleap sever. It contains this symbol : !
    User avatar

    That should be enough, that's strange.

    I don't need the payload at the moment but could you try to run the rest call by hand and share the result ?:

    curl -vvv -u yourlogin:yourpassword -XGET https://servicedesk.csti.ch//rest/api/2/project
    

    (ideally you would run that from your workstation and from the tuleap server to see if there is a difference)

    User avatar

    Hello Manuel, Unfortunately it still doesn't work for me I have this message now : Query was not successful (code: 401, message: "Unauthorized"). Error response cannot be read, invalid json for https://servicedesk.csti.ch//rest/api/2/project When I try this request manually in the same browser web, I have a result Maybe the json file in return doesn't have the same format in cloud and in Jira Server (I can provide you the result if it can help) Maybe the API Token is bad, I use a personal access token (https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html) Let me know what do you think ? Thanks in advance

    User avatar

    The solution will be to have a specialized JiraClient for JiraServer. I'll give it a try


    • Status changed from Verified to Under implementation
    User avatar

    Hello Manuel, Thanks, when do you think this patch will be available please ? Is it a big change in the code ? Best regards Isabelle