Comments (10)
to bind custom fields is difficulty features and i have no plan at this time.
i'm hoping to you contributing here. :)
from php-jira-rest-client.
It seems that it is possible to dynamically create attribute, and it is sent properly right now:
$issueField = new IssueField();
$issueField->customfield_10360 = 'XXX';
Of course the problem is validating field. Maybe having metadata of field could allow to create set of methods to create proper attribute, for example:
$issueField->addCustomField(mixed $fieldData, array $fieldSchema);
Where $fieldSchema is for example:
Array
(
[required] =>
[schema] => Array
(
[type] => string
[custom] => com.atlassian.jira.plugin.system.customfieldtypes:textarea
[customId] => 10360
)
[name] => Acceptance Criteria
[hasDefaultValue] =>
[operations] => Array
(
[0] => set
)
)
Where based on type we can make validation and proper parameter type, and based on customId we can create parameter name.
Do you think it is good idea? If yes then I can create methods as I need custom fields to work and send it to you, so you could add it to the project if you feel it is worthy.
from php-jira-rest-client.
@lesstif @MBBanfi any progress on this topic? I'm interested too by custom fields, btw, thank you for the lib!
from php-jira-rest-client.
really sorry for delayed reply.
i think bind custom fields would be a useful features, but there is no progress yet.
from php-jira-rest-client.
@lesstif cweiske/jsonmapper introduces mapping of "Unknown properties". It can be helpful for you.
/**
* Handle undefined properties during JsonMapper::map()
*
* @param object $object Object that is being filled
* @param string $propName Name of the unknown JSON property
* @param mixed $jsonValue JSON value of the property
*
* @return void
*/
function setUndefinedProperty($object, $propName, $jsonValue)
{
$object->{'UNDEF' . $propName} = $jsonValue;
}
$jm = new JsonMapper();
$jm->undefinedPropertyHandler = 'setUndefinedProperty';
$jm->map(...);
from php-jira-rest-client.
@vagovszky thanks for your comment. i have a plan to implements custom field at next week.
from php-jira-rest-client.
Lessif - as i wrote before i fixed a bit your library (sorry for so long time before i published it).
It also allows you to set/fetch custom fields. Feel free to use any code there^^
https://github.com/Setitch/php-jira-api-rest-client
from php-jira-rest-client.
@Setitch i can't access your repository. can you make the PR, please?
from php-jira-rest-client.
https://github.com/Setitch/php-jira-api-rest-client
I wrote the address wrongly - fixed it now. Sorry for that.
from php-jira-rest-client.
closed in https://github.com/lesstif/php-jira-rest-client/releases/tag/1.9.0.
from php-jira-rest-client.
Related Issues (20)
- Epic tasks include subtasks but subtask timeTracking is null HOT 3
- PHP 8.2 support
- `IssueField::duedate` unused HOT 2
- Creation of dynamic property JiraRestApi\Issue\Worklog::$issueId & Worklog::$created is deprecated
- Unable to configure the logger to use a custom handler. HOT 1
- Fatal error on NoOperationMonologHandler::write() HOT 2
- PHP 8.2 support / some properties are still dynamically created HOT 4
- PHP version 8.2.3 Deprecated: Creation of dynamic property JiraRestApi\Issue\IssueType::$entityId is deprecated in ... /vendor/lesstif/php-jira-rest-client/src/JsonMapperHelper.php on line 26 HOT 2
- In PHP 8.2.1, I get several of the following messages: "User Deprecated: Method "JsonSerializable::jsonSerialize()" might add "mixed" as a native return type declaration in the future." HOT 1
- Assignee not being set HOT 3
- Return type wrong after PHP 8.2 fixes
- error "invalid request payload" when create or update project HOT 3
- JSON property "parent" in class "JiraRestApi\Issue\IssueField" must not be NULL HOT 7
- Typed property JiraRestApi\Issue\Reporter::$emailAddress must not be accessed before initialization
- Creation of dynamic property JiraRestApi\Sprint\Sprint::$createdDate is deprecated
- Empty customField HOT 1
- IssueService::getCustomFields() does not get custom fields HOT 1
- HTTP Request Failed: Status Code : 403, "Failed to parse Connect Session Auth Token" HOT 1
- Issue with dynamic property creation (php8.2) HOT 1
- PHPUnit tests are failing HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-jira-rest-client.