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

tylernathanreed / jira-client-php / 13678007438

05 Mar 2025 02:15PM UTC coverage: 2.081% (+0.01%) from 2.067%
13678007438

push

github

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

141 of 6775 relevant lines covered (2.08%)

0.03 hits per line

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

0.0
/src/Operations/ScreenTabFields.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 ScreenTabFields
10
{
11
    /**
12
     * Returns all fields for a screen tab
13
     * 
14
     * **"Permissions" required:**
15
     * 
16
     *  - *Administer Jira* "global permission"
17
     *  - *Administer projects* "project permission" when the project key is specified, providing that the screen is associated with the project through a Screen Scheme and Issue Type Screen Scheme.
18
     * 
19
     * @link https://confluence.atlassian.com/x/x4dKLg
20
     * @link https://confluence.atlassian.com/x/yodKLg
21
     * 
22
     * @param int $screenId The ID of the screen.
23
     * @param int $tabId The ID of the screen tab.
24
     * @param string $projectKey The key of the project.
25
     * 
26
     * @return list<Schema\ScreenableField>
27
     */
28
    public function getAllScreenTabFields(
×
29
        int $screenId,
30
        int $tabId,
31
        ?string $projectKey = null,
32
    ): array {
33
        return $this->call(
×
34
            uri: '/rest/api/3/screens/{screenId}/tabs/{tabId}/fields',
×
35
            method: 'get',
×
36
            query: compact('projectKey'),
×
37
            path: compact('screenId', 'tabId'),
×
38
            success: 200,
×
39
            schema: [Schema\ScreenableField::class],
×
40
        );
×
41
    }
42

43
    /**
44
     * Adds a field to a screen tab
45
     * 
46
     * **"Permissions" required:** *Administer Jira* "global permission".
47
     * 
48
     * @link https://confluence.atlassian.com/x/x4dKLg
49
     * 
50
     * @param int $screenId The ID of the screen.
51
     * @param int $tabId The ID of the screen tab.
52
     */
53
    public function addScreenTabField(
×
54
        Schema\AddFieldBean $request,
55
        int $screenId,
56
        int $tabId,
57
    ): Schema\ScreenableField {
58
        return $this->call(
×
59
            uri: '/rest/api/3/screens/{screenId}/tabs/{tabId}/fields',
×
60
            method: 'post',
×
61
            body: $request,
×
62
            path: compact('screenId', 'tabId'),
×
63
            success: 200,
×
64
            schema: Schema\ScreenableField::class,
×
65
        );
×
66
    }
67

68
    /**
69
     * Removes a field from a screen tab
70
     * 
71
     * **"Permissions" required:** *Administer Jira* "global permission".
72
     * 
73
     * @link https://confluence.atlassian.com/x/x4dKLg
74
     * 
75
     * @param int $screenId The ID of the screen.
76
     * @param int $tabId The ID of the screen tab.
77
     * @param string $id The ID of the field.
78
     */
79
    public function removeScreenTabField(
×
80
        int $screenId,
81
        int $tabId,
82
        string $id,
83
    ): true {
84
        return $this->call(
×
85
            uri: '/rest/api/3/screens/{screenId}/tabs/{tabId}/fields/{id}',
×
86
            method: 'delete',
×
87
            path: compact('screenId', 'tabId', 'id'),
×
88
            success: 204,
×
89
            schema: true,
×
90
        );
×
91
    }
92

93
    /**
94
     * Moves a screen tab field
95
     * 
96
     * If `after` and `position` are provided in the request, `position` is ignored
97
     * 
98
     * **"Permissions" required:** *Administer Jira* "global permission".
99
     * 
100
     * @link https://confluence.atlassian.com/x/x4dKLg
101
     * 
102
     * @param int $screenId The ID of the screen.
103
     * @param int $tabId The ID of the screen tab.
104
     * @param string $id The ID of the field.
105
     */
106
    public function moveScreenTabField(
×
107
        Schema\MoveFieldBean $request,
108
        int $screenId,
109
        int $tabId,
110
        string $id,
111
    ): true {
112
        return $this->call(
×
113
            uri: '/rest/api/3/screens/{screenId}/tabs/{tabId}/fields/{id}/move',
×
114
            method: 'post',
×
115
            body: $request,
×
116
            path: compact('screenId', 'tabId', 'id'),
×
117
            success: 204,
×
118
            schema: true,
×
119
        );
×
120
    }
121
}
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