1

I love to work with features! I often work with several colleges on the same feature and I'ld like to add a signature to the features. So we can see who worked last on the feature (without having to dig in Bitbucket).

It must be possible since the example Features do so:

enter image description here

But all I get are Unavailable signatures :(

enter image description here

Any one know this magic?

1

I wrote a patch which will allow users to enter an "Author" name when creating/updating a feature.
When provided, the signature will take the Authors value, if not fallback on standard workflow.

Setting the signature was my goal and I succeeded. For those interested, here is the patch:

diff --git a/sites/all/modules/contrib/features/features.admin.inc b/sites/all/modules/contrib/features/features.admin.inc
index a4203a0..3c5c913 100644
--- a/sites/all/modules/contrib/features/features.admin.inc
+++ b/sites/all/modules/contrib/features/features.admin.inc
@@ -168,6 +168,15 @@ function features_export_form($form, $form_state, $feature = NULL) {
     '#size' => 30,
     '#element_validate' => array('features_export_form_validate_field'),
   );
+  $form['info']['author'] = array(
+    '#title' => t('Author'),
+    '#description' => t('Examples: Patrick, John'),
+    '#type' => 'textfield',
+    '#required' => FALSE,
+    '#default_value' => !empty($feature->info['author']) ? $feature->info['author'] : '',
+    '#size' => 30,
+    '#element_validate' => array('features_export_form_validate_field'),
+  );
   $form['advanced'] = array(
     '#type' => 'fieldset',
     '#title' => t('Advanced Options'),
@@ -832,7 +841,7 @@ function _features_export_generate($export, $form_state, $feature = NULL) {

   $module_name = $form_state['values']['module_name'];
   // Directly copy the following attributes from form_state
-  $attr = array('name', 'description', 'package', 'project path');
+  $attr = array('name', 'description', 'package', 'project path', 'author');
   foreach ($attr as $key) {
     $export[$key] = isset($form_state['values'][$key]) ? $form_state['values'][$key] : NULL;
   }
@@ -1083,7 +1092,10 @@ function features_admin_form($form, $form_state) {
       '#disabled' => $disabled,
     );

-    if (!empty($module->info['project status url'])) {
+    if (!empty($module->info['author'])) {
+      $uri = check_plain($module->info['author']);
+    }
+    else if (!empty($module->info['project status url'])) {
       $uri = l(truncate_utf8($module->info['project status url'], 35, TRUE, TRUE), $module->info['project status url']);
     }
     else if (isset($module->info['project'], $module->info['version'], $module->info['datestamp'])) {

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.