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

Create method returns typed stage abbreviation #125

Closed
mico opened this issue Sep 29, 2022 · 12 comments · Fixed by #126
Closed

Create method returns typed stage abbreviation #125

mico opened this issue Sep 29, 2022 · 12 comments · Fixed by #126
Assignees
Labels
enhancement New feature or request

Comments

@mico
Copy link
Contributor

mico commented Sep 29, 2022

@opoudjis thanks for the explanation. We could provide the "FDTR" abbreviation and full name for a pubid. The same happens for TR, PAS.

How about pubid.typed_stage_abbev for "FDTR" and pubid.typed_stage_name for "Final Draft Technical Report"?

Originally posted by @ronaldtse in #102 (comment)

@ronaldtse
Copy link
Contributor

Agree! Thanks!

@ronaldtse
Copy link
Contributor

@mico could you help action this ticket? @opoudjis needs to use it. Thanks!

@opoudjis
Copy link

opoudjis commented Oct 3, 2022

This ticket is the only remaining ticket for metanorma-iso integration

@ronaldtse ronaldtse added the enhancement New feature or request label Oct 3, 2022
@ronaldtse ronaldtse moved this to 🆕 New in Metanorma Oct 3, 2022
@ronaldtse ronaldtse moved this from 🆕 New to 🌋 Urgent in Metanorma Oct 3, 2022
@opoudjis
Copy link

opoudjis commented Oct 4, 2022

"IS" is not being returned as a stage abbreviation for 60, but given that it doesn't render, that's ok. @Intelligent2013 can I confirm that no abbreviation attribute on the stage for published documents doesn't disrupt you?

@opoudjis
Copy link

opoudjis commented Oct 4, 2022

Getting Pubid::Iso::Errors::NoEditionError: Base document must have edition, when I parse an ISO base document identifier to generate its amendment. I'd refer a default edition of 1, but I'm going to supply it as a default myself.

@Intelligent2013
Copy link

@Intelligent2013 can I confirm that no abbreviation attribute on the stage for published documents doesn't disrupt you?

@opoudjis currently ISO XSLT uses the value from iso-standard/bibdata/status/stage/@abbreviation for determination of the front pages layout. Regarding the published documents, if @abbreviation = 'IS', then these fields render on cover page:

  • edition
  • bibdata/date[@type = 'published']
  • bibdata/date[@type = 'created']
  • revision year, month from bibdata/version/revision-date

For instance - edition and revision :
image
Source presentation XML:

<status><stage abbreviation="IS" language="">60</stage><stage abbreviation="IS" language="en">International Standard</stage><substage>60</substage></status>

@opoudjis
Copy link

opoudjis commented Oct 4, 2022

I see.

An added problem is that because the abbreviation is specific to the document type, we are going to get TR instead of IS in technical reports; and that is in fact correct behaviour.

I'm sorry to say this @Intelligent2013 , but I think the preferable course of action is to replace the test for published documents, from abbreviation = IS, to stage = 60.

@opoudjis
Copy link

opoudjis commented Oct 4, 2022

@mico I need the typed_stage_abbrev to work with amendments and corrigenda as well.

Pubid::Iso::Identifier.parse("ISO 17301-1:2030/CD Amd 1").typed_stage_abbrev is returning nil; it should return "CD Amd" (or whatever we've decided the stage abbreviation is).

I can use Pubid::Iso::Identifier.parse("ISO 17301-1:2030/CD Amd 1").amendments.first.stage, but that is the raw stage, not the stage specific to amendments, so I am assuming it will not customise by type properly.

@opoudjis
Copy link

opoudjis commented Oct 4, 2022

I query why PRF is not provided as the stage abbreviation for 60:00. I understand that PRF is not rendered in the identifier, but @ronaldtse, can we make an exception for PRF? We are already optionally printing it.

@ronaldtse
Copy link
Contributor

@opoudjis I'm not sure what exactly the value and use case you're looking for. Mock code will help.

@opoudjis
Copy link

opoudjis commented Oct 4, 2022

....!!!!

I need to be able to indicate for front cover page purposes that the abbreviation of 60.00 is PRF, just as I do with other pre-pub states (and PRF is one).

Pubid::Iso::Identifier.new(number: 200, stage: "PRF").typed_stage_abbrev is returning nil, not "PRF"

And I need a stage abbreviation for amendments and corrigenda for the front cover page, just as I do for normal documents:

Pubid::Iso::Identifier.parse("ISO 17301-1:2030/CD Amd 1").typed_stage_abbrev is nil

The use case for these is the same use case as for any other stage abbreviation: (a) publishing on the front cover as metadata, and (b) decision criterion for Alex D (although I'm urging him now not to use it).

@ronaldtse
Copy link
Contributor

@mico, please help change the PR so that this code works:

Pubid::Iso::Identifier.new(number: 200, stage: "PRF").typed_stage_abbrev
# is returning nil
# should return "PRF"
Pubid::Iso::Identifier.parse("ISO 17301-1:2030/CD Amd 1").typed_stage_abbrev
# is returning nil
# should return "CD Amd"

Repository owner moved this from 🌋 Urgent to ✅ Done in Metanorma Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants