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

tylernathanreed / jira-client-php / 13634794100

03 Mar 2025 03:19PM UTC coverage: 2.067% (-0.1%) from 2.21%
13634794100

push

github

web-flow
~ Try coveralls action

140 of 6773 relevant lines covered (2.07%)

0.03 hits per line

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

0.0
/src/Operations/ProjectProperties.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 ProjectProperties
10
{
11
    /**
12
     * Returns all "project property" keys for the project
13
     * 
14
     * This operation can be accessed anonymously
15
     * 
16
     * **"Permissions" required:** *Browse Projects* "project permission" for the project.
17
     * 
18
     * @link https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties
19
     * @link https://confluence.atlassian.com/x/yodKLg
20
     * 
21
     * @param string $projectIdOrKey The project ID or project key (case sensitive).
22
     */
23
    public function getProjectPropertyKeys(
×
24
        string $projectIdOrKey,
25
    ): Schema\PropertyKeys {
26
        return $this->call(
×
27
            uri: '/rest/api/3/project/{projectIdOrKey}/properties',
×
28
            method: 'get',
×
29
            path: compact('projectIdOrKey'),
×
30
            success: 200,
×
31
            schema: Schema\PropertyKeys::class,
×
32
        );
×
33
    }
34

35
    /**
36
     * Returns the value of a "project property"
37
     * 
38
     * This operation can be accessed anonymously
39
     * 
40
     * **"Permissions" required:** *Browse Projects* "project permission" for the project containing the property.
41
     * 
42
     * @link https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties
43
     * @link https://confluence.atlassian.com/x/yodKLg
44
     * 
45
     * @param string $projectIdOrKey The project ID or project key (case sensitive).
46
     * @param string $propertyKey The project property key.
47
     *                            Use "Get project property keys" to get a list of all project property keys.
48
     */
49
    public function getProjectProperty(
×
50
        string $projectIdOrKey,
51
        string $propertyKey,
52
    ): Schema\EntityProperty {
53
        return $this->call(
×
54
            uri: '/rest/api/3/project/{projectIdOrKey}/properties/{propertyKey}',
×
55
            method: 'get',
×
56
            path: compact('projectIdOrKey', 'propertyKey'),
×
57
            success: 200,
×
58
            schema: Schema\EntityProperty::class,
×
59
        );
×
60
    }
61

62
    /**
63
     * Sets the value of the "project property".
64
     * You can use project properties to store custom data against the project
65
     * 
66
     * The value of the request body must be a "valid", non-empty JSON blob.
67
     * The maximum length is 32768 characters
68
     * 
69
     * This operation can be accessed anonymously
70
     * 
71
     * **"Permissions" required:** *Administer Jira* "global permission" or *Administer Projects* "project permission" for the project in which the property is created.
72
     * 
73
     * @link https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties
74
     * @link http://tools.ietf.org/html/rfc4627
75
     * @link https://confluence.atlassian.com/x/x4dKLg
76
     * @link https://confluence.atlassian.com/x/yodKLg
77
     * 
78
     * @param string $projectIdOrKey The project ID or project key (case sensitive).
79
     * @param string $propertyKey The key of the project property.
80
     *                            The maximum length is 255 characters.
81
     */
82
    public function setProjectProperty(
×
83
        string $projectIdOrKey,
84
        string $propertyKey,
85
    ): true {
86
        return $this->call(
×
87
            uri: '/rest/api/3/project/{projectIdOrKey}/properties/{propertyKey}',
×
88
            method: 'put',
×
89
            path: compact('projectIdOrKey', 'propertyKey'),
×
90
            success: 200,
×
91
            schema: true,
×
92
        );
×
93
    }
94

95
    /**
96
     * Deletes the "property" from a project
97
     * 
98
     * This operation can be accessed anonymously
99
     * 
100
     * **"Permissions" required:** *Administer Jira* "global permission" or *Administer Projects* "project permission" for the project containing the property.
101
     * 
102
     * @link https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties
103
     * @link https://confluence.atlassian.com/x/x4dKLg
104
     * @link https://confluence.atlassian.com/x/yodKLg
105
     * 
106
     * @param string $projectIdOrKey The project ID or project key (case sensitive).
107
     * @param string $propertyKey The project property key.
108
     *                            Use "Get project property keys" to get a list of all project property keys.
109
     */
110
    public function deleteProjectProperty(
×
111
        string $projectIdOrKey,
112
        string $propertyKey,
113
    ): true {
114
        return $this->call(
×
115
            uri: '/rest/api/3/project/{projectIdOrKey}/properties/{propertyKey}',
×
116
            method: 'delete',
×
117
            path: compact('projectIdOrKey', 'propertyKey'),
×
118
            success: 204,
×
119
            schema: true,
×
120
        );
×
121
    }
122
}
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