Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement: Add new namespace #64

Closed
sorenweber opened this issue Oct 7, 2016 · 7 comments
Closed

enhancement: Add new namespace #64

sorenweber opened this issue Oct 7, 2016 · 7 comments

Comments

@sorenweber
Copy link

This is related to #50.

Is it possible to get the option that the page created is the start page of a a name space? That is, if I write "some_page" in the input field, the page created is actually "some_page:start".

Perhaps it could be generic, the syntax could be modified with an optional "subnamespace": {{NEWPAGE>namespace>subnamespace}}
If you wrote "MY_PAGE" in the input field, your new page would be namespace:MY_PAGE:subnamespace, e.g. from {{NEWPAGE>reports:electrical>start}} I would get reports:electrical:MY_PAGE:start.
Or even {{NEWPAGE>reports:electrical>some:deep:structure}} to get reports:electrical:MY_PAGE:some:deep:structure.

The reason is this: we use this plugin to create new problem report pages (bug reports, non-conformity reports), but people also need to upload various files relating to the problem, and I would like that these are stored in sub-namespaces withe the report's name.

I could ask people to write "the name of the page:start" in the input field, but I know many are not that technically minded and some will find this complicated and make errors, e.g. add spaces around the colon.

@igittigitt
Copy link

I would recomment this too! I also tried to create the new page as the "start" page of a new namespace. So the logic is turned around, that what you enter in the inputfield is not the NAME of the new page but the NAMESPACE.
I also tried various versions in to write this and use placeholders, but nothing worked for me.

@sorenweber
Copy link
Author

Since you write @igittigitt I can tell that I have instead used the Bureaucracy Plugin.

@ghost
Copy link

ghost commented May 30, 2022

@sorenweber Could you share the bureaucracy plug-in snippet you are using for this?
I need a „Create page in current namespace“ and a „Create new namespace“ button that creates a namespace including its start-Page.

Thank you!

@sorenweber
Copy link
Author

@aov-arnold, I am creating a non-conformance report (NCR) page which has its own sub-namespace below the NCR namespace, and within which files relevant to the NCR are uploaded.

Below are the page with the form that is presented to the user and the template it calls. I hope you can use them as inspiration for what you want to do.

The page with the form:

====== NCR template ======

~~MULTI_PLUGIN_OPEN~~

<form>
Action template q:ncr:i_template "q:ncr:ncr @@NCRnr@@:start"
hiddenautoinc "NCRnr"
Fieldset "Required"
textbox "Part no."
textbox "Product name"
textbox "NCR headline"
textbox "Non-conformity description"
number "Quantity"
textbox "Serial no."
textbox "Externals reference" !
data_aliastextbox "Root-cause origin" _ncrrco
data_aliastextbox "Supplier" _ncrsupplier
textbox "Initial corrector" "=xxx" !
Fieldset "Submit"
submit "Create NCR"
</form>


~~NOCACHE~~

And this is the template (q:ncr:i_template) it calls:

~~NOCACHE~~

<WRAP noprint>[[:q:ncr:start|↑ Go to NCR Overview]]</WRAP>

====== NCR @@NCRnr@@ @@NCR headline@@ ======

~~MULTI_PLUGIN_OPEN~~
---- dataentry ncr ----
ncr id_hidden : NCR @@NCRnr@@ # the NCR id number
status_ncrwf : created # Set status of NCR (created, correct, completed, rejected, approved)
product : @@Product name@@ # product name
quantity : @@Quantity@@ # number of affected parts
creator : @USER@ # you
created_dt : %Y-%m-%d # creation date written as YYYY-MM-DD
corrector : @@Initial corrector@@ # initials of corrector assigned by NCR board
approver : xxx # initials of approver assigned by NCR board
priority_ncrprio : N/A # assigned by NCR board
claim_ncrclaim: N/A # assigned by NCR board
part number : @@Part no.@@ # part number
root-cause origin_ncrrco : @@Root-cause origin@@
serial numberss : @@Serial no.@@ # comma separated list of serial numbers
external's reference : @@Externals reference@@ # Reference id used by another party, e.g. supplier
ICO reference :  # fill in the ICO reference if relevant
supplier_ncrsupplier : @@Supplier@@ # Choose the relevant supplier (or N/A or Other)
error type : (QM will fill this in) # QM will categorize the error
planned due date_dt : # when it is expected done
actual due date_dt : # when it is actually done
----
~~MULTI_PLUGIN_CLOSE~~

===== 1. Description of non conformity =====
@@Non-conformity description@@

===== 2. Root cause to non- conformity =====
WRITE HERE!

===== 3. Correction and Corrective action =====
WRITE HERE!

Fill in the ICO reference (if there is one) in the header table at the top of the page.

===== 4. Preventive action =====
WRITE HERE if applicable!

Fill in the ICO reference (if there is one) in the header table at the top of the page.

===== 5. Follow up of preventive action =====
WRITE HERE!

===== Attachments =====
^List|
|{{medialist>@NS@:*}}|

@ghost
Copy link

ghost commented Jun 17, 2022

Thank you but for us it would be enough to add a "create namespace" button.
This should create a new namespace with the name from the input and a start page from the selected template.

@samwilson Would this be difficult to implement?

@Nils98Ar
Copy link

@dregad Could you add a new button Add folder which adds a :start suffix to the id?

@dregad
Copy link
Owner

dregad commented Sep 24, 2023

This should be covered by #72, which I've been working on to resolve the merge conflicts. That's nearly done (testing in progress) and should be released soon.

@dregad dregad closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants