• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tylernathanreed / jira-client-php / 13834920235

13 Mar 2025 12:45PM UTC coverage: 71.089% (-2.2%) from 73.289%
13834920235

push

github

tylernathanreed
Merge branch 'master' of github.com:tylernathanreed/jira-client-php

3976 of 5593 relevant lines covered (71.09%)

9.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/src/Operations/Tasks.php
1
<?php
2

3
namespace Jira\Client\Operations;
4

5
use Jira\Client\Client;
6
use Jira\Client\Schema;
7

8
/** @phpstan-require-extends Client */
9
trait Tasks
10
{
11
    /**
12
     * Returns the status of a "long-running asynchronous task"
13
     * 
14
     * When a task has finished, this operation returns the JSON blob applicable to the task.
15
     * See the documentation of the operation that created the task for details.
16
     * Task details are not permanently retained.
17
     * As of September 2019, details are retained for 14 days although this period may change without notice
18
     * 
19
     * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024
20
     * 
21
     *  - `read:jira-work`
22
     * 
23
     * **"Permissions" required:** either of:
24
     * 
25
     *  - *Administer Jira* "global permission"
26
     *  - Creator of the task.
27
     * 
28
     * @link https://confluence.atlassian.com/x/x4dKLg
29
     * 
30
     * @param string $taskId The ID of the task.
31
     */
32
    public function getTask(
1✔
33
        string $taskId,
34
    ): Schema\TaskProgressBeanObject {
35
        return $this->call(
1✔
36
            uri: '/rest/api/3/task/{taskId}',
1✔
37
            method: 'get',
1✔
38
            path: compact('taskId'),
1✔
39
            success: 200,
1✔
40
            schema: Schema\TaskProgressBeanObject::class,
1✔
41
        );
1✔
42
    }
43

44
    /**
45
     * Cancels a task
46
     * 
47
     * **"Permissions" required:** either of:
48
     * 
49
     *  - *Administer Jira* "global permission"
50
     *  - Creator of the task.
51
     * 
52
     * @link https://confluence.atlassian.com/x/x4dKLg
53
     * 
54
     * @param string $taskId The ID of the task.
55
     */
56
    public function cancelTask(
×
57
        string $taskId,
58
    ): true {
59
        return $this->call(
×
60
            uri: '/rest/api/3/task/{taskId}/cancel',
×
61
            method: 'post',
×
62
            path: compact('taskId'),
×
63
            success: 202,
×
64
            schema: true,
×
65
        );
×
66
    }
67
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc